Skip to content
IDOR Write-up Intermediate

How Sensitive Information Disclosure Can Lead to Account Takeover

An API endpoint exposed sensitive user information, including the google_id, through an IDOR vulnerability. By manipulating the google_id and idToken, an attacker could generate a JWT for another user's account and achieve full account takeover.

medium.com

Published on medium.com

During a recent security assessment, I stumbled upon a critical account takeover vulnerability on a website that stemmed from an Insecure Direct Object Reference (IDOR) vulnerability. This incident not only highlighted the importance of secure API design but also demonstrated how sensitive information exposure can…

Devansh Doshi, 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 API lacked proper access control on user IDs and the authentication flow failed to validate that the Google ID token belonged to the same user.

Impact

An attacker could gain full access to any user's account, leading to account takeover.

What the attacker needed

Knowledge of a victim's user ID; ability to intercept and modify requests

The fix

The application should enforce proper access controls on API endpoints and validate that the Google ID token matches the intended user during authentication.

How it was found

  1. Review the application's API and find an endpoint that returns user information by ID.
  2. Change the ID parameter to another user's ID to retrieve their google_id.
  3. Capture the login request that generates the idToken.
  4. Replace the user_id parameter with the victim's google_id.
  5. Capture the request that generates the JWT token and replace the idToken.
  6. The server returns a JWT for the victim's account, granting full access.

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 is a flaw where a website lets you change an identifier in a request to access someone else's data. Here, the site returned a user's Google identifier, which was then used to trick the login system into issuing a session token for that user. This let the attacker log 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.