Skip to content
Leaked secrets Write-up Intermediate

Token Trouble: How Leaked JWTs Let Me Become Everyone on the Internet

The application leaked JWT tokens in error responses and JavaScript files, and accepted multiple JWT algorithms including 'none'. An attacker could use a leaked admin token to access admin endpoints and export all user data.

iski Follow

Published on medium.com

Free link 🎈

Iski, on 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

Root cause

Likely the application logged sensitive tokens in error responses and failed to properly validate JWT signatures and algorithms.

Impact

An attacker could gain full admin access and export all user data.

What the attacker needed

Access to the application; ability to trigger errors

The fix

The application should not log tokens, should reject the 'none' algorithm, and should use strong secrets; the text does not state whether these were fixed.

How it was found

  1. Scan JavaScript files and network traffic for JWT patterns.
  2. Analyse found tokens by decoding them without verification.
  3. Test algorithm confusion attacks such as 'none' and weak secrets.
  4. Trigger an error to receive a leaked admin token in the response.
  5. Use the admin token to access admin endpoints and export user data.

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 JWT is a token that proves who you are when you use a website. This site accidentally showed these tokens in error messages and code files, and it also accepted tokens that were not properly signed. So anyone who found a token could pretend to be that user, even an admin.

What is Leaked secrets?

Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.

More by iski

View all

186 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Leaked secrets and credentials

The lesson behind this report.

Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.