How I Found a Critical IDOR Leading to Full Account Takeover and
The application used a sequential user ID in requests without checking ownership, so an attacker could read and modify any user's profile. By changing a victim's email to their own and using password reset, the attacker could take over the account.
Published on medium.com
I wasn’t looking for anything specific, just exploring websites for research and practice. Eventually, I came across a donation platform.
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 trusted the user_id supplied in requests and cookies without verifying that the authenticated user owned that identifier.
Impact
An attacker could read every user's personal data, modify or delete their content, and take over any account by changing the email and resetting the password.
What the attacker needed
A free account; knowledge of a victim's user ID
How it was found
- Register an account and observe the profile request containing a sequential user_id.
- Change the user_id to another number and receive that user's full profile data.
- Send a request to delete another user's profile picture using their user_id.
- Send an update-profile request with a victim's user_id and change their email to the attacker's email.
- Use the forgot-password feature with the victim's account, receive the reset email, and set a new password.
- Log in as the victim.
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 refer to your data but does not check that you are allowed to access it. Here, changing the number in a request let the attacker see and edit other people's profiles, and then reset their password to log in as them.
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.