Skip to content
Info disclosure Write-up Beginner

The GraphQL Goldmine: Why You Should Test Every Single Query for

Several GraphQL queries on a corporate Git instance returned sensitive internal data to unauthenticated users, including user role counts, the full RBAC permission catalogue, and compliance control settings. An attacker could use this to map the organisation, identify administrator accounts, and learn which defences are missing.

Scarabel0x Follow

Published on medium.com

When a target uses REST APIs, finding hidden endpoints requires aggressive fuzzing and directory brute-forcing. But when a target uses GraphQL, the application often hands you its entire API documentation on a silver platter.

Scarabel0x, 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 developers added authorization checks to mutations that change data but forgot to add them to resolvers that fetch configuration, metadata, or statistics.

Impact

An unauthenticated attacker could learn the number and names of administrator roles, the full set of internal permission names to target for privilege escalation, and which security controls are configured or missing; the text does not show any data being changed.

What the attacker needed

GraphQL introspection enabled; no account needed

The fix

Authorization should be enforced in every GraphQL resolver, including those that return configuration, metadata, or statistics, not only in mutations.

How it was found

  1. Find the GraphQL endpoint and send an introspection query to dump the schema.
  2. Load the schema into a tool such as InQL to list every query and mutation.
  3. Remove all authorization headers and session cookies from the requests.
  4. Send each query and mutation as an unauthenticated user and note which ones return data.

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.

GraphQL is a way for apps to ask a server for exactly the data they need through one address. The server can be asked to list everything it offers, and the author found that some of those data requests did not check whether the person was logged in. So anyone on the internet could read internal details like how many administrators exist and which security rules are switched on.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More by Scarabel0x

View all

6 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.