From Logs to Loot: How Debug Files Exposed User Sessions and Led
A publicly accessible GraphQL debug log file contained a login mutation with a valid JWT token. The attacker used this token to gain admin-level API access, enumerate user sessions, and download a backup file containing sensitive data.
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 debug log file was publicly accessible and contained sensitive request data including authentication tokens.
Impact
The exposed token allowed admin-level API access, user session hijacking, and download of a backup containing database dumps, password hashes, and API keys.
What the attacker needed
Publicly accessible debug log file; log contains valid authentication token
How it was found
- Find the debug log file via recon.
- Extract the JWT token from the log.
- Use the token to authenticate to the GraphQL API.
- Run introspection to discover hidden queries.
- Query getUserSessions to retrieve session data.
- Use downloadBackup to obtain a backup file.
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 log file was left publicly accessible and it recorded a login request that included a valid authentication token. Anyone who found the file could use that token to log in as an admin and access sensitive data.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.