Skip to content
Crypto Write-up Intermediate

How I Made $6,000 by Exploiting JWT Manipulation on a Web3 Crypto

A Web3 crypto platform signed its authentication tokens with a weak, guessable secret key. An attacker who recovered that key could forge a token claiming admin rights and gain administrative access to the platform.

Krish_cyber Follow

Published on cybersecuritywriteups.com

A few months ago, while hunting for vulnerabilities in Web3 applications, I stumbled upon a critical JWT (JSON Web Token) manipulation bug that led to a $6,000 bounty payout! 🚀 If you’re into bug bounty hunting, cybersecurity, or Web3 security, you’ll love this breakdown of how I found, exploited, and reported this…

Krish_cyber, on cybersecuritywriteups.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 the application used a weak, guessable HMAC secret for signing JWTs, allowing the signing key to be recovered and tokens to be forged.

Impact

An attacker could forge an admin token and gain administrative access to the platform.

What the attacker needed

A valid user account on the platform; ability to intercept HTTP requests; a wordlist for brute-forcing the key

The fix

The application should use a strong, securely stored signing key (for example asymmetric RS256 keys), validate signatures server-side, and not rely on token claims alone for privilege checks.

How it was found

  1. Intercept a request and copy the JWT used for authentication.
  2. Decode the token to inspect its header and payload.
  3. Brute-force the HS256 secret key using a wordlist.
  4. Modify the payload to set the admin claim to true.
  5. Re-sign the modified token with the recovered secret.
  6. Replace the original token in the request and refresh to obtain admin access.

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 is a small signed piece of text a website gives you after login to prove who you are. The signature is made with a secret key, so if that key is easy to guess, someone can write their own token saying they are an administrator and the site will believe it. Here the key was weak enough to crack, so the author could pretend to be an admin.

What is Crypto?

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

More by Krish_cyber

View all

12 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.