How I Earned a $1,000 Bounty by Exploiting a Simple IDOR
An API endpoint returned user profile data for any user ID supplied in the URL, without checking that the authenticated caller owned that object. An authenticated attacker could change the ID to read other users' profile information.
medium.com
Published on medium.com
Basic Bypass and a good bounty: just changed a single user ID, and it exposed all other users’ data.
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 server authenticated the request but did not authorise it, trusting the user ID in the URL instead of checking it against the logged-in account.
Impact
An authenticated attacker could access profile information belonging to other users by modifying the user ID; the author did not test whether other endpoints were affected.
What the attacker needed
A valid account and access token; knowledge of another user's ID
The fix
The vulnerability was fixed after follow-ups, though the text does not describe the fix itself.
How it was found
- Log in and observe the GET request to the user details endpoint containing a sequential user ID.
- Send that request to a repeater tool to modify it.
- Change only the user ID in the path to another user's ID.
- Send the request and observe the other user's profile data 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.
After logging in, the app asks the server for your profile using a number in the web address, like /api/users/842. The server checked that you were logged in but not that the number belonged to you. By changing the number to another user's, the author could read their profile details.
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.