How I Discovered a $7,000 Critical Vulnerability: IDOR to BAC to
The application exposed a numerical user ID in API responses and failed to check authorisation on user detail and update endpoints, allowing an attacker to read other users' data and modify their details. By supplying a chosen hashed password in the update request, the attacker could overwrite another user's password and take over the account.
In a recent bug bounty engagement, I discovered a critical vulnerability in a web application’s user management system. The chain of exploits involved Insecure Direct Object Reference (IDOR), Broken Access Control (BAC), and ultimately led to Account Takeover (ATO).
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 API trusted a client-supplied user identifier and lacked server-side authorisation checks on both read and update operations, including password changes.
Impact
An attacker could read sensitive personal data and hashed passwords, modify bank details and other information, and fully take over another user's account.
What the attacker needed
A free account; knowledge of a target user ID
The fix
The API should enforce server-side authorisation on every request, avoid exposing internal identifiers, and require re-authentication or additional checks before allowing password changes.
How it was found
- Create an account and observe the request that retrieves user details.
- Note the numerical user ID exposed in the response.
- Replace the userId in later requests with that numerical ID to fetch other users' details.
- Use the same technique on the user update endpoint to modify another user's information.
- Include a chosen hashed password in the update request to overwrite the target user's password.
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.
The app used a hidden-looking user identifier, but its response also revealed a simple number for each user. The server never checked whether the person making a request was allowed to see or change that user's data. So by swapping in someone else's number, the attacker could read their private details and even reset their password.
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.