Skip to content
IDOR Write-up Beginner

My First IDOR - Hiding in the Header Request

An API endpoint returned user data based on a custom header containing a predictable user identifier, and removing the Authorization header still returned the same data. An attacker could guess or brute-force other user IDs to access their data.

hbenja47 Follow

Published on medium.com

In the midst of a busy schedule, the little time I dedicate to bug hunting brings immense joy, especially when I stumble upon something new. Reporting my first IDOR was a thrilling experience.

Benja (bronxi), on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the server trusted a client-supplied custom header as the user identifier without verifying it against the authenticated session.

Impact

An attacker could guess or brute-force user IDs to access other users' data, though the author did not actually perform a brute-force attack on real user data.

What the attacker needed

A valid account; ability to send custom headers

The fix

The server should derive the user identity from the authenticated session (e.g., the Bearer token) and not trust a client-supplied header for authorization.

How it was found

  1. Send a GET request to the user data endpoint with the Authorization header.
  2. Remove the Authorization header and repeat the request; it still returns the same user data.
  3. Inspect the request headers and find a custom header named DomName containing a user ID.
  4. Create a second user and test with a different user ID in the DomName header; it works.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

An IDOR (Insecure Direct Object Reference) happens when a website uses a value like a user ID to decide whose data to show, but does not check that you are allowed to see that data. Here, the user ID was sent in a custom header, and the server did not verify that the request came from the right user. By changing that header to another user's ID, someone could read their information.

What is IDOR?

One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.

More by hbenja47

View all

2 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Insecure direct object reference (IDOR)

The lesson behind this report.

One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.