The $1,000,000 Bug: How I Spent 3 Months on a Single Target and Found the Most Critical Chain of My Career
The backend trusted the 'kid' header in JWTs without verifying it against a known JWKs endpoint, and a leaked signing secret allowed forging an admin token. The attacker gained admin access, escalated to cloud credentials, and could read 20M+ user records.
Published on theindiannetwork.medium.com
Bug bounty is not always fast money. Sometimes, it’s long hours, failures, and obsession over small details.
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
Impact
The attacker could become an internal admin, access full user database and PII, and gain read-write access to cloud resources, potentially compromising 20M+ user records.
What the attacker needed
Leaked JWT signing secret in public repo; ability to send crafted JWT
The fix
The JWT validation logic should be fixed to verify the 'kid' against a trusted JWKs endpoint, rotate AWS keys, and restrict internal roles.
How it was found
- During SSO testing, notice an internal tool uses third-party SSO but has a separate backend JWT validator.
- Craft a forged JWT with a manipulated 'kid' header and HS256 algorithm.
- Brute-force the signing key using a leaked GitHub repository.
- Use the forged JWT to be treated as an internal admin.
- Access admin endpoints to obtain AWS keys.
- Use AWS keys to access S3 buckets, CloudWatch logs, and SSM Parameter Store.
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 signed ID card that a server checks to know who you are. The server here checked the signature using a key it should not have trusted, and a secret key was left in a public code repository. That let the attacker make a fake admin ID card and get into the system.
What is OAuth / SSO?
Mistakes in OAuth, OpenID Connect, SAML or token handling that leak codes and tokens or link an attacker's identity to a victim's account.