Header Games: How a Single HTTP Header Misconfiguration Led Me t
A production GraphQL endpoint exposed a debug header that, when manipulated, leaked verbose error messages and internal API paths. The attacker then introspected the schema and queried sensitive user data, obtaining a valid JWT token that granted access to admin settings including API keys and database credentials.
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, debug mode was enabled in production and the GraphQL endpoint lacked proper authorization checks, allowing schema introspection and sensitive data queries.
Impact
The attacker could access sensitive user data and administrative settings, including API keys and database credentials, potentially leading to full system compromise.
What the attacker needed
Access to the GraphQL endpoint; debug mode enabled in production
The fix
Debug modes should be disabled in production, response headers sanitised, schema-level authorization implemented, and leaked keys rotated immediately.
How it was found
- Send a request to the GraphQL endpoint with a modified debug header.
- Observe verbose error messages revealing internal paths and JWT validation hints.
- Perform a GraphQL introspection query to obtain the full schema.
- Query user details to retrieve PII and a JWT token.
- Use the leaked token to query admin settings and obtain API keys and database credentials.
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 debug mode left on in a live website can reveal hidden details about how the system works. The attacker noticed a special response header that indicated debug mode was active, then used it to get error messages that showed internal paths and hints about security tokens. This let them access private data and even admin settings.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.