Skip to content
IDOR Write-up Intermediate

Account Takeover via IDOR: From UserID to Full Access

An unauthenticated profile update endpoint accepted a user ID in both the query and body, allowing an attacker to change another user's email address. This enabled account takeover via the password reset flow.

medium.com

Published on medium.com

After discovering an unauthenticated endpoint leaking sensitive user data in the same application (see my previous writeup here), I had a feeling there was more waiting beneath the surface. The app was behaving oddly, and I was still navigating it through an anonymous session.

0xP0L73R63157, 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

Impact

An attacker could take over any user's account by changing their email and triggering a password reset, without authentication.

What the attacker needed

No authentication needed; knowledge of a valid user ID

The fix

The endpoint should verify that the authenticated user matches the user ID being updated, and require authentication.

How it was found

  1. Access the profile settings page in an anonymous session.
  2. Fill in the form with dummy values and intercept the submission request.
  3. Replace the user ID in the query parameter and request body with a real user's ID.
  4. Change the email address field to a new value.
  5. Forward the request and observe a redirect.
  6. Use the password reset feature with the new email to confirm the change.

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.

The app let anyone update a user's profile by just changing an ID number in the request, without checking if they were logged in as that user. By changing the email to their own, an attacker could then use the 'forgot password' feature to get a reset link and take over the account.

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.