How i Find IDOR lead to account takeover
The application used a sequential user ID in the account update request without checking ownership, so an attacker could change another user's password. By swapping their own ID for the victim's, the attacker could take over any account.
medium.com
Published on medium.com
Today, I’m excited to share a recent find that turned a simple curiosity into a full-blown account takeover exploit, all thanks to an Insecure Direct Object Reference (IDOR) vulnerability
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-supplied ID in the update request and did not verify that the authenticated user owned that account.
Impact
An attacker could enumerate IDs and take over any account on the platform, potentially including higher-privilege users if IDs were predictable.
What the attacker needed
A free account; victim has an account; sequential user IDs
The fix
The application should verify that the authenticated user owns the account referenced by the ID before allowing updates.
How it was found
- Create two accounts and note their sequential user IDs.
- Log in as the first account and go to the account settings update page.
- Intercept the profile update request with a proxy.
- Change the user ID in the request from the attacker's ID to the victim's ID.
- Send the request and observe a successful response.
- Log out and log in as the victim with the new password to confirm takeover.
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 an identifier like a user ID to decide which record to change, but does not check that the person making the request owns that record. Here, the attacker changed the ID in their own profile update request to the victim's ID and set a new password, then logged in as the victim.
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.