GraphQL Gatecrash: When an Introspection Query Opened the Whole B
An unauthenticated GraphQL endpoint on a development subdomain had introspection enabled and exposed queries and mutations without any authorisation checks. An attacker could enumerate users, read password hashes and personal data, and download other users' invoice PDFs by guessing sequential order IDs.
Free Link🎈
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 development GraphQL endpoint was exposed without authentication or authorisation checks, and introspection was left enabled, revealing sensitive queries and mutations.
Impact
An unauthenticated attacker could read admin password hashes and personal data, and download other users' invoices containing addresses and payment details.
What the attacker needed
No account needed; network access to the dev subdomain
The fix
The endpoint should require authentication and per-field authorisation, and introspection should be disabled outside development.
How it was found
- Find a development subdomain hosting a GraphQL endpoint.
- Send a request to the GraphQL endpoint and receive a 200 OK without authentication.
- Run an introspection query to retrieve the full schema.
- Enumerate queries and mutations, including user lookup and invoice download.
- Query user records by numeric ID to retrieve email, password hash, phone and role.
- Loop through sequential invoice order IDs to obtain PDF URLs for other users.
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. A special built-in query called introspection lets anyone list every query and field the server supports, like a menu. Here the menu was public and the kitchen was open: no login was needed to ask for other people's details or invoices.
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.