Skip to content
Leaked secrets Write-up Beginner

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.

shaikhminhaz1975 Follow

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.

Shaikh Minhaz, 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 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

  1. Open the website and press F12 to open Developer Tools.
  2. Go to the Sources tab and look for JavaScript files such as config.js or main.*.js.
  3. Search within the files for keywords like key, token, auth, or api.
  4. 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.

More by shaikhminhaz1975

View all

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