Passively Found Secrets in Javascript File on a Private Bug Bounty Program
A JavaScript file exposed sensitive values including an AWS key and secret, internal paths, tokens, and a Vercel token. The AWS credentials had expired, but the Vercel token was exploitable and the program treated its disclosure as a high-severity concern.
Sharat Kaikolamthuruthil Follow
Published on medium.com
This is a small post to explain how I was able to passively find secrets in javascript file.
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 secrets such as cloud credentials and deployment tokens were embedded in client-side JavaScript that is served to every visitor.
Impact
The exposed Vercel token was exploitable and considered a cause for concern, while the AWS credentials had already expired and could not be used.
What the attacker needed
Access to the target's JavaScript files; Burp Suite with jsluice++ extension
How it was found
- Install the jsluice++ Burp Suite extension and enable its secret-detection settings.
- Set the target in Burp Suite scope and browse the application.
- Wait for the extension to notify that a secret was found in an in-scope JavaScript file.
- Open the JavaScript file and review the disclosed values manually.
- Check whether the AWS key and secret are exploitable (they had expired).
- Report the exposed values to the program.
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.
Websites often ship JavaScript files that run in your browser, and developers sometimes leave secret passwords or API keys inside them by mistake. Anyone can read these files, so a secret in one is effectively public. Here, a tool that scans JavaScript traffic flagged such secrets, and one of them (a Vercel token) could still be used by an attacker.
What is Leaked secrets?
Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.