Skip to content
OAuth / SSO Write-up Advanced

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.

theindiannetwork Follow

Published on theindiannetwork.medium.com

Bug bounty is not always fast money. Sometimes, it’s long hours, failures, and obsession over small details.

TheIndianNetwork, on theindiannetwork.medium.com

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

  1. During SSO testing, notice an internal tool uses third-party SSO but has a separate backend JWT validator.
  2. Craft a forged JWT with a manipulated 'kid' header and HS256 algorithm.
  3. Brute-force the signing key using a leaked GitHub repository.
  4. Use the forged JWT to be treated as an internal admin.
  5. Access admin endpoints to obtain AWS keys.
  6. 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.

More by theindiannetwork

View all

23 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

OAuth and single sign-on flaws

The lesson behind this report.

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.