API key (api.semrush.com) leak in JS-file
A publicly accessible JavaScript file exposed an internal API token. An attacker could use that token to access internal statistics of Semrush's systems.
- Triaged in 18 hours
- Fixed in 46 days
- Paid in 4 days
- Disclosed after 15 months
Summary by the program
The researcher found a javascript file with an API token that allowed to get internal statistics.
Summary by the researcher
When you access a page not found on the application, the source code of the page contains a portion of code that list a lot of javascript files. Some of these javascript files correspond to the Semrush internal interface, including some that display the internal statistics of Semrush’s systems. These publicly accessible javascript files contained an internal API token that allowed access to internal statistics of Semrush’s systems.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely, an internal API token was embedded in client-side JavaScript that was publicly served, including on the not-found page.
Impact
An attacker could use the leaked token to access internal statistics of Semrush's systems.
What the attacker needed
None
How it was found
- Access a page that does not exist on the application.
- Inspect the source code of the not-found page, which lists many JavaScript files.
- Identify JavaScript files belonging to the Semrush internal interface, including ones that display internal statistics.
- Find the internal API token contained in those publicly accessible JavaScript files.
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 report has not been written yet. The Original tab links to the source.
A website's JavaScript files are downloaded by every visitor's browser, so anyone can read them. One of these files contained a secret API token, which is like a password that lets software talk to a service. Because the file was public, anyone could find the token and use it to read internal statistics.
What is Leaked secrets?
Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.