Skip to content
Access control Write-up Intermediate

How I Found an Auth Flaw in a Government Site: From GraphQL Intro

A GraphQL endpoint on a government site allowed unauthenticated queries to retrieve sensitive participant data, including names, emails, and phone numbers. An attacker could harvest this personally identifiable information without any credentials.

Aruvasaga chithan A Follow

Published on infosecwriteups.com

GraphQL has become increasingly popular because it allows clients to request exactly the data they need.

Aruvasaga chithan A, on infosecwriteups.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 resolvers did not enforce authentication or authorization checks, allowing anonymous access to sensitive queries.

Impact

An attacker could retrieve personally identifiable information (PII) such as names, email addresses, phone numbers, departments, and designations without authentication, enabling targeted phishing and data harvesting.

What the attacker needed

No authentication required; GraphQL endpoint accessible

The fix

The issue was fixed by the organization approximately one month after responsible disclosure.

How it was found

  1. Notice a GraphQL version disclosure in the application source.
  2. Capture a GET request to an API endpoint in Burp Suite.
  3. Modify the request to a POST with a GraphQL query to confirm GraphQL processing.
  4. Send an introspection query to check if schema introspection is enabled.
  5. Use GraphQL Voyager to visualise the schema and identify sensitive queries.
  6. Remove all authentication headers and send a query for candidate data, receiving a 200 OK with records.

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 specific data. Here, the server did not check who was asking, so anyone could request private details about people. This is like a library that lets anyone read confidential files without a library card.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More by Aruvasaga chithan A

View all

3 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.