From IDOR to Admin Door: The Bug That Opened Everything
The forgot-password flow returned a user ID in the response and trusted that ID without verifying ownership, so changing it exposed another user's data. By enumerating IDs the researcher reached an admin account, effectively taking control of the application.
medium.com
Published on medium.com
Hi, I’m Dinesh Narasimman — you can call me as Professor. I’m a cybersecurity researcher who is always trying to become the best version of myself.
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 password-reset endpoint accepted a client-supplied user ID and returned or acted on that account's data without checking that the session belonged to that user.
Impact
An attacker could view other users' data and, by enumerating IDs, reach an admin account, effectively taking control of the application.
What the attacker needed
A phone number to receive OTP; ability to intercept requests; a second account for comparison
The fix
The password-reset flow should derive the account from the verified session or OTP rather than a client-supplied ID, and should check that the requester owns the account.
How it was found
- Use the forgot-password feature and enter a phone number.
- Enter the received OTP and fill in the new password details.
- Intercept the request and inspect the response for an id parameter.
- Create a second account, repeat the flow, and swap the new account's ID into the original request's response.
- Observe that the application returns the other user's data without verifying that user's OTP.
- Enumerate numeric IDs and find an admin account at id=4.
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 (Insecure Direct Object Reference) happens when a website uses a simple identifier, like a number, to decide which record to show, and never checks that the person asking owns that record. Here, after the password reset, the app handed back a number for the account and accepted any number the user supplied. Changing the number let the researcher see other people's data, including an admin's.
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.