Skip to content
IDOR Write-up Beginner

Multiple API issues due to Fixed Authorization token.

Every user was issued the same fixed Authorization token, so the token did not identify the caller. An attacker could read other users' information and change their details by swapping the user ID in the request.

Zeeshan Mustafa Follow

Published on medium.com

This bug isn’t fixed yet and it’s on a private program so I can’t disclose the program name and their users data.

Zeeshan Mustafa, 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

The API used a single hard-coded Authorization token for all users instead of issuing a unique, per-user credential, so authorisation depended only on the user ID supplied in the request.

Impact

An attacker could disclose other users' information and remotely change their details; the text does not claim the bug was fixed.

What the attacker needed

A free account; ability to send API requests; knowledge of a target user ID

The fix

The API should issue a unique, per-user Authorization token and validate that the token belongs to the requested user ID, rather than relying on a shared fixed token.

How it was found

  1. Create a test account and log in, then open the browser developer tools network tab.
  2. Find the REST API request to the user endpoint that includes the user ID.
  3. Request the endpoint with your own user ID and observe that it returns your information even without the Authorization header.
  4. Log out and confirm the token still works, then create a second account and note its user ID.
  5. Send the same request with the second account's user ID and the original token, and see the second account's information returned.
  6. Compare the tokens from both accounts and find they are identical, then brute-force user IDs to collect many valid ones.

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 API is the part of a website that apps talk to in order to fetch or change data. Normally each user gets a secret token that proves who they are, but here every account shared one identical token. That meant the token proved nothing, and anyone who guessed or brute-forced a user ID could read or edit that person's data.

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 Zeeshan Mustafa

View all

1 more disclosed report, 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.