I Found a Critical Bug in JWT Authentication and Earned $10,000 — Here’s How You Can Too!
The JWT authentication used a weak, predictable secret, allowing an attacker to forge admin tokens. The attacker could bypass authentication and gain admin access to the payment platform.
Published on theindiannetwork.medium.com
It was just another late night in my cybersecurity research routine when I stumbled upon something unusual in a popular online payment platform. I had been hunting bugs for a while, reporting vulnerabilities responsibly, and earning decent payouts.
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 JWT signing secret was weak and predictable, allowing token forgery.
Impact
An attacker could gain full control over user accounts, process unauthorized transactions, and access sensitive financial data.
What the attacker needed
Knowledge of weak secret; ability to send HTTP requests
The fix
The platform should use strong, unpredictable secrets and consider asymmetric signing (RS256) instead of HS256, and validate JWT tokens securely.
How it was found
- Reconnaissance using tools to map endpoints.
- Discovered a vulnerable API endpoint for authentication.
- Crafted a forged JWT token using a weak secret.
- Sent the forged token in an Authorization header to access the admin dashboard.
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.
JWT (JSON Web Token) is a way for a server to give a user a signed token after login, so the user can prove who they are on later requests. If the secret used to sign the token is weak or guessable, an attacker can create their own token claiming to be an admin. This report shows that the platform used such a weak secret, so the attacker could log in as an administrator without a password.
What is Crypto?
Encryption, signatures, randomness or certificate checks that do not protect what they claim to.