Skip to content
IDOR Write-up Intermediate

GraphQL IDOR leads to information disclosure

A GraphQL endpoint allowed an authenticated user to fetch another user's profile data by changing a user ID parameter, because the server did not check that the requested ID belonged to the caller. An attacker could read other users' email addresses, mobile numbers, and API keys.

Eshan Singh Follow

Published on medium.com

{{media:0}}

Eshan Singh, 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 GraphQL resolver for the User query did not verify that the supplied user ID matched the authenticated user, allowing any authenticated user to request data for any other user.

Impact

An authenticated attacker could read other users' email addresses, mobile numbers, and API keys, which could lead to further account compromise.

What the attacker needed

A free account; victim's user ID from profile source

How it was found

  1. Run an introspection query to discover the Users type and its fields.
  2. Edit your profile and intercept the request to see the CurrentUserData query with a base64-encoded id variable.
  3. Decode the id to learn your own user identifier.
  4. Create a second account and obtain its user identifier.
  5. Log in with the first account and send the same query but replace the id with the second account's id.
  6. Find other users' ids by viewing the source code of their profile pages and searching for a variable that holds the user ID.

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.

A GraphQL API is a way for apps to ask a server for specific data. An IDOR (Insecure Direct Object Reference) happens when the server lets you access someone else's data just by changing an identifier, like a user ID, without checking if you are allowed. Here, the user ID was hidden in the page source, so anyone could find it and then use it to read another person's private details.

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.

More by Eshan Singh

View all

1 more disclosed report, best first.

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.