Skip to content
Info disclosure Write-up Intermediate

Console Chronicles: How Browser DevTools Unlocked a $XXXX Bounty

A source map file exposed internal API endpoints and a JWT stored in local storage. The JWT was signed with a weak secret, allowing the attacker to forge an admin token and access sensitive data including AWS keys.

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 combination of deploying a source map file to production, storing a JWT in local storage, and using a weak secret to sign the JWT.

Impact

The attacker could access all user data, compromise AWS credentials, and gain full admin access to the internal panel.

What the attacker needed

Access to the web application; browser with developer tools

The fix

The report does not state that the issue was fixed, but it should be fixed by removing source maps from production, using strong JWT secrets, and not storing sensitive tokens in local storage.

How it was found

  1. Inspect the login page's JavaScript files using browser Developer Tools.
  2. Notice a source map file and download it to view the original source code.
  3. Find internal API endpoints and a comment about AWS keys in the source map.
  4. Check local storage and find a JWT token.
  5. Use jwt_tool to crack the weak secret and forge a token with admin role.
  6. Use the forged token to access internal endpoints and promote the account to superadmin.

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 source map is a file that helps developers debug minified code by mapping it back to the original. If left on a production server, it can reveal hidden endpoints and secrets. Here, it exposed an internal API and a token that was weakly protected, letting the attacker become an admin.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More by iski

View all

186 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.