The Bug Behind the Delete Button: How I Found a Critical IDOR
A user-deletion endpoint accepted a request body identifying the account to delete, and the server did not check that the caller owned that account. An attacker with any valid token could delete other users' accounts by supplying their identifier.
medium.com
Published on medium.com
The first thing I do when testing a new application is create a few accounts. It helps me see how the app behaves from different perspectives.
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 server authorised the request only by the presence of a valid token and never compared the token's owner with the account identifier in the request body.
Impact
An authenticated attacker could delete other users' accounts, though the text does not show how the target identifier was obtained or whether any defence limited the attack.
What the attacker needed
A valid account and token; knowledge of a target account identifier
How it was found
- Create a few accounts to see how the app behaves from different perspectives.
- Explore forms, menus and pages to understand how data moves between users.
- Review requests and notice the user-deletion endpoint that carries an account identifier in its body.
- Replay that request using a token from a different account and observe that it succeeds.
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.
When you log in, the site gives your browser a token, a short secret that proves who you are. This endpoint trusted the account identifier written in the request instead of checking that the token belonged to that same account, so anyone logged in could ask it to delete someone else'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.