Found a Leaked JWT Token in a Public GitHub Repo — Here Is What
A hardcoded JWT token was found in a public GitHub repository, granting access to a staging GraphQL API with merchant-level permissions. The token allowed schema introspection and revealed payment-related mutations, but the triage team deemed it intentional for sandbox testing, resulting in no security impact.
Not every bug bounty submission ends with a payout. Some end with a lesson.
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 token was intentionally placed in a public test repository for sandbox use, not a mistake.
Impact
The token could be used to access a staging GraphQL API, enumerate the schema, and see payment-related mutations, but it had no real security impact because it was sandbox infrastructure with no connection to production data or real payments.
What the attacker needed
Public GitHub repository; hardcoded JWT token present; token valid for staging API
How it was found
- Found a hardcoded JWT token in a public GitHub repository.
- Decoded the token to see it had a merchant-backend role and was valid for about 18 days.
- Used the token to authenticate to a GraphQL API endpoint and confirmed it worked.
- Ran a full GraphQL schema introspection query to list all types.
- Queried the mutation root to discover available write operations like payment capture and user creation.
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 JSON Web Token (JWT) is like a digital key that proves who you are to an API. Here, a developer accidentally left a working key in public code, letting anyone use it to talk to a test version of the company's payment system. However, because it was only for testing and not real money or data, it wasn't considered a real security problem.
What is Leaked secrets?
Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.