How I Exposed 1,337 User Records With One GraphQL Query
A GraphQL query for a user's workspace could be extended to include workspace members and their user details, and the server returned data for all members across the platform rather than just the requester's workspace. An attacker could use this to expose thousands of user records, including emails and names.
Let’s be honest. Most security research starts with a quiet, simple question.
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 backend trusted the query structure and did not enforce authorization on every node, so nested fields like workspace members and their user details were returned without checking if the requester should see them.
Impact
A single query could expose thousands of user records, including emails and names, and similar logic allowed enumerating companies, viewing audit logs for other teams, and accessing admin configuration data.
What the attacker needed
Access to the GraphQL API; a valid user account or token
The fix
The issue was fixed by implementing strict access control on every GraphQL node, not just at the API gateway.
How it was found
- Start with a standard query for basic workspace information.
- Add a related field for workspace members to see if the query accepts it.
- Traverse the relationship further to request user details such as email and name for each member.
- Observe that the server returns user records for all members across the platform, not just the requester's workspace.
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. Here, the server checked that the user could ask about their own workspace, but it did not check whether they should see the list of all members and their personal details. So a normal request could be changed to return everyone's information.
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.