Scroll, Find, Boom! How I Tripped Over a Bounty in Just 3 Lines o
A Last.fm API key was exposed in a public JavaScript file, allowing anyone to query user profile and listening data without authentication. The key also lacked rate limiting, enabling potential scraping and profiling of users.
Published on osintteam.blog
Hey folks! I go by myselfakash20 pretty much everywhere on the internet.
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, making it publicly accessible, and the API lacked rate limiting.
Impact
An attacker could scrape listening data to profile users, sell trends, link with public socials for phishing, or build creepy insights, though the bug was rated P4 and the key only allowed read access to public data.
What the attacker needed
Access to the public JavaScript file; no authentication required
The fix
The API key should be removed from client-side code and the API should enforce rate limiting.
How it was found
- Open the public JavaScript file in a browser and search for the API key.
- Use the key to call the user.getinfo method and retrieve a user's profile.
- Use the key to call the user.getrecenttracks method and retrieve a user's recent tracks.
- Send the request 20 times in a loop to test for rate limiting.
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.
An API key is like a password that lets software talk to a service. Here, the key was left in a file that anyone can download, so anyone could use it to read Last.fm user information. The service also didn't limit how many requests could be made, so someone could collect a lot of data quickly.
What is Leaked secrets?
Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.