My First Bounty: How I Found an Information Disclosure Bug on Ha
An API key was exposed in the page source of a website, which the author later identified as a Bearer token. Using this token, the author could access a sensitive API endpoint that returned a 200 OK response.
Published on medium.com
Today, I'm excited to share the story of how I earned my first bounty. As a beginner in the bug bounty world, this was a huge moment for me—and I hope it inspires others who are just starting out.
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 in client-side JavaScript, exposing it to anyone who viewed the page source.
Impact
An attacker could use the exposed token to access sensitive API endpoints, potentially leading to information disclosure.
What the attacker needed
Access to the website's page source
How it was found
- View the page source of the website.
- Notice an API key in the HTML.
- Later identify the key as a Bearer token.
- Try to access a sensitive endpoint in the browser, which returns 404.
- Use Postman to send a request with the token and necessary headers.
- Receive a 200 OK response, confirming access.
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 page source is the code that browsers receive, and sometimes developers accidentally leave secret keys there. This key turned out to be a Bearer token, a kind of password that lets someone access an API (a way for programs to talk to a server). Because the token was visible to anyone, the author could use it to reach private data.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.