Skip to content
IDOR Write-up Intermediate

IDOR leads to account takeover

The app's phone number update endpoint accepted a user ID parameter that was not tied to the authenticated user, allowing an attacker to change another user's phone number. Combined with an OTP request endpoint that could send codes to any number, the attacker could reset the victim's password and take over the account.

s0cket7 Follow

Published on web.archive.org

Insecure Direct Object Reference with an OTP abuse bug led to full account takeover.

s0cket7 (@s0cket7), on web.archive.org

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

Impact

An attacker could take over any user's account by changing their phone number and resetting their password.

What the attacker needed

A free account; knowledge of victim's user ID; ability to receive OTP on attacker's phone

How it was found

  1. Observe that the login response discloses a user ID and phone number even on failed authentication.
  2. Request an OTP for any phone number via the password reset or phone change flow.
  3. Send the phone number update request with the victim's user ID in the up_uid parameter and a valid OTP.
  4. Use the forgot password flow with the newly set phone number to reset the victim's password.

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 user-supplied identifier, like a user ID, to decide which record to change, without checking that the logged-in user owns that record. Here, the attacker could put someone else's user ID into a request and change their phone number. Because the app also let anyone request a password reset code for any phone number, the attacker could then reset the victim's password and 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.

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.