Skip to content
Crypto Write-up Beginner

Unbelievable Security Hole: JWT Secret in a Series-B Funded Compa

The mobile API accepted JWTs signed with a well-known HMAC secret, allowing the tester to forge tokens and access any user's account by changing the userId claim. The tester could sequentially access user accounts, including administrative ones, without rate limiting.

Erkan Kavas Follow

Published on infosecwriteups.com

It started as a routine penetration test. Little did I know I was about to uncover one of the most basic yet catastrophic security vulnerabilities imaginable in a company with 11.8 million users and $140 million in Series B funding.

Erkan Kavas, on infosecwriteups.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

Root cause

Likely a development or default HMAC secret was left in production and used to sign JWTs, with no rotation or secret management.

Impact

An attacker could access any user's account, including administrative accounts, exposing personal data, phone numbers, addresses, order history and payment patterns, with potential regulatory fines and reputational damage.

What the attacker needed

Knowledge of the weak JWT secret; network access to the mobile API

The fix

The company acknowledged the issue and began incident response and a patch, but the text does not confirm the fix was completed.

How it was found

  1. While testing the mobile API, Burp Suite flagged that JWTs were signed with a well-known HMAC secret.
  2. Using the disclosed secret, the tester generated a JWT with a chosen userId and called the /v1/auth/ endpoint.
  3. The forged token was accepted, so the tester wrote a script to iterate userId values and retrieve user details.
  4. The script accessed accounts sequentially, including administrative ones, without rate limiting.

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 signature uses a secret key; if that key is weak or known, anyone can create a valid card for any user. Here the secret was a well-known default, so the tester could make tokens for other users and read their data.

What is Crypto?

Encryption, signatures, randomness or certificate checks that do not protect what they claim to.

More by Erkan Kavas

View all

3 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Cryptographic weaknesses

The lesson behind this report.

Encryption, signatures, randomness or certificate checks that do not protect what they claim to.