GraphQL introspection leads to sensitive data disclosure
The GraphQL endpoint allowed introspection queries, which revealed the API schema. An attacker could then query sensitive fields to retrieve transaction receipts, user passwords, and phone numbers.
Published on medium.com
{{media:0}}
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 endpoint had introspection enabled and did not restrict access to sensitive fields, allowing anyone to discover and query them.
What the attacker needed
A free account; access to the /graphql endpoint
The fix
The vulnerability should be fixed by disabling GraphQL introspection in production and implementing proper authorization checks on sensitive fields.
How it was found
- Create an account on the target domain.
- Use Burp Suite to spider the site and discover the /graphql endpoint.
- Log out and log in again, then go to the 'Update Profile' section and change the name.
- Intercept the profile update request and send it to Repeater.
- Observe the __typename field in the request and modify it to test reflection.
- Send a GraphQL introspection query to the /graphql endpoint and receive a detailed schema response.
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. Introspection is a built-in feature that lets anyone ask the server to describe all its data types and fields. If introspection is left on, an attacker can learn the full structure and then request sensitive information that should be hidden.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.