How I Found a GraphQL Endpoint Leaking Millions
An unauthenticated GraphQL query exposed a user list with fields such as username, seller status, and account age, and the total count revealed tens of millions of records. An attacker could export this data to enable credential stuffing and targeted phishing against sellers.
Published on prateekpulastya.medium.com
This write-up covers a mass user enumeration vulnerability I discovered during a bug bounty engagement on a large e-commerce marketplace platform. The finding was confirmed valid by the security team, but closed as a duplicate — meaning another researcher had found and reported it before me.
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 `users` query was added to the GraphQL schema without an authentication check at the field resolver level, and GraphQL does not apply route-level middleware like REST.
Impact
An unauthenticated attacker could export usernames, seller status, and account age for tens of millions of users, enabling credential stuffing and targeted phishing against sellers; no defence limited the exploit.
What the attacker needed
No account needed; network access to the API
The fix
The fix should add authentication at the GraphQL field resolver level for the users query, remove totalCount from unauthenticated responses if public browsing is intended, implement query depth and rate limiting, and audit all root query fields for missing authorization checks.
How it was found
- Enumerate subdomains and find the API endpoint, then append /graphql/ to confirm it is live.
- Check introspection; it is disabled, so use error messages from invalid field queries to discover field names like users and user.
- Query the users field with a minimal selection set to get totalCount without authentication.
- Expand the query to request all available fields for a page of users.
- Send multiple requests to confirm there is no rate limiting.
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 lets clients ask for exactly the data they want. Here, a query that lists users had no login check, so anyone could ask for user details and the total number of users. This exposed millions of records that could be used to guess passwords or target sellers.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.