Skip to content
IDOR Write-up Beginner

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

black_virus, on medium.com

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

  1. Create two accounts and note their sequential user IDs.
  2. Log in as the first account and go to the account settings update page.
  3. Intercept the profile update request with a proxy.
  4. Change the user ID in the request from the attacker's ID to the victim's ID.
  5. Send the request and observe a successful response.
  6. 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.

Similar reports

View all

Same bug class and techniques, clearest first.

Insecure direct object reference (IDOR)

The lesson behind this report.

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.