Skip to content
IDOR Write-up Beginner

I Changed a Number — and Accessed Another User’s Data

The application exposed user data through API endpoints that accepted a user identifier without checking whether the requester was allowed to access that user's records. By changing the identifier, an attacker could read other users' profiles, orders, documents and settings, and potentially admin data.

medium.com

Published on medium.com

At first, everything looked normal. The application returned the logged-in user’s profile data.

Vishnuram M, 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 backend trusted the client-supplied user identifier and returned data for it without performing an authorization check on the requested resource.

Impact

An attacker could read other users' profiles, orders, documents and settings, and if a low identifier returned admin data the impact could escalate to privilege escalation; the text does not confirm that admin data was actually returned.

What the attacker needed

A logged-in account; ability to intercept and modify requests

The fix

The application should enforce server-side authorization checks on every request to confirm the logged-in user is allowed to access the requested resource, for example with role-based access control.

How it was found

  1. Intercept a request to the profile endpoint that contains a user identifier.
  2. Change the identifier value to another user's identifier.
  3. Send the modified request and observe that another user's data is returned.
  4. Repeat the same identifier change on other endpoints such as orders, documents and settings.
  5. Try a low identifier such as 1 to see whether admin data is returned.

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 identifier is a number or code that names a specific record, such as a user profile. Here the website used the identifier sent by the browser to decide which record to return, but never checked that the person asking owned that record. So anyone who changed the number could see someone else's 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.

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.