How I Found My First Web Bug as a Beginner
A JavaScript file publicly exposed an API key for a third-party service. An attacker could use this key to access that service, though the text does not specify the key's permissions or what actions it allowed.
Published on medium.com
Yes — your first real bug is closer than you think. Not some textbook nonsense, not a contrived lab — a bug on a live program that was in-scope, legal to test, and acknowledged by the team.
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 API key was hardcoded into client-side JavaScript instead of being kept on the server.
What the attacker needed
None
The fix
The issue was fixed according to the reply, but the text does not describe how.
How it was found
- Open the website and press F12 to open Developer Tools.
- Go to the Sources tab and look for JavaScript files such as config.js or main.*.js.
- Search within the files for keywords like key, token, auth, or api.
- Find a line with an API key and note the file URL, line number, and take a screenshot.
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 website's JavaScript file contained a secret key that should have been kept private. Anyone could view this file and see the key, which might let them use the third-party service as if they were the website owner. The key was exposed because it was included in code sent to every visitor's browser.
What is Leaked secrets?
Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.