I Broke Into a GraphQL API Using a File Nobody Reads ️♂️
A GraphQL API endpoint for partner details lacked authentication, allowing anyone to query private business data such as contract limits and competitor blacklists. The endpoint also accepted internal database IDs, enabling automated enumeration of all partners' data.
Published on medium.com
And right there, written in plain text, were internal partner names. Paths that weren’t meant to be found.
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 partnerDetail did not perform any authentication or authorization check before returning sensitive partner data.
Impact
An unauthenticated attacker could retrieve private business data for any partner, and by enumerating IDs, could dump data for all partners, with no rate limiting to stop automated scripts.
What the attacker needed
None
The fix
The API should verify the user's identity and authorization before returning private data, implement rate limiting, and remove internal paths from robots.txt.
How it was found
- Read the robots.txt file to find internal partner paths.
- Open a partner page and inspect network requests to see GraphQL calls.
- Send a direct GraphQL query to the API without any authentication.
- Observe that the server returns private partner data.
- Notice the query also accepts internal database IDs, allowing enumeration.
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.
An API is like a waiter that takes your order and brings data from the kitchen. Here, the waiter never checked if you were allowed to order, so anyone could ask for private business details. The endpoint also accepted internal IDs, so someone could loop through them to get everyone's data.
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.