Skip to content
Leaked secrets Disclosed report Beginner

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.

a_d_a_m Follow

Originally disclosed on HackerOne

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

The original report as published on HackerOne, by a_d_a_m. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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

  1. Access a page that does not exist on the application.
  2. Inspect the source code of the not-found page, which lists many JavaScript files.
  3. Identify JavaScript files belonging to the Semrush internal interface, including ones that display internal statistics.
  4. 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.

More by a_d_a_m

View all

12 more disclosed reports, best first.

More from Semrush

View all

The newest disclosed reports for this program.

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.