IDOR to Account Takeover — My $4500 Bug Bounty Journey
A user-lookup endpoint accepted an identifier as a query parameter and returned another user's data without checking ownership, and the response also linked the attacker's account to the victim's details. By then triggering a password reset, the author says they could take over the victim's account.
medium.com
Published on medium.com
When selecting a target, I always look for applications with lots of features and endpoints — more functionality usually means more surface area to test. During one of my recent recon sessions, I came across an interesting endpoint:
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 query-parameter version of the user endpoint lacked an ownership check and reused the supplied identifier when associating account data, unlike the path-based version that returned 401.
Impact
An attacker with their own account could read another user's data and, per the author, fully take over that user's account.
What the attacker needed
Two free accounts; knowledge of the victim's identifier
How it was found
- Register two accounts, one attacker and one victim
- Request the victim's data through the path-based user endpoint and observe the 401
- Try several path variations to bypass the check, all of which fail
- Browse the application in a proxy and notice a user lookup that takes an identifier as a query parameter
- Send the request with the attacker's identifier, then swap in the victim's identifier
- Trigger a password reset and use the resulting association to take over the victim's account
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 is when a site lets you change an identifier in a request, such as a user number, and hands back someone else's information because it never checks that the record belongs to you. Here the site also mixed up which account the returned details belonged to, so a password reset went to the wrong place and the attacker gained control of the victim's account.
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.