Skip to content
XSS Disclosed report Beginner

Code injection in https://www.semrush.com

A reflected injection flaw on the Semrush homepage let an attacker craft a URL that rendered attacker-supplied HTML, including a link to an external site. The reporter says this could be used to show a fake notification and to redirect the victim to an attacker-controlled page for phishing.

dangkhai0x21 Follow

Originally disclosed on HackerOne

  • Triaged in 19 hours
  • Fixed in 4 days
  • Paid in 41 hours
  • Disclosed after 5 days

Summary by the program

During the internal investigation, we have found ways to perform XSS attack using this vulnerability.

The report

##INTRODUCES: -With a direct error on the homepage, it is easy to trick the victim into accessing a fake page from the attacker

##STEP: Step: Send url with payload to victim: https://www.semrush.com/marketplace/%22%0D%0A/%3E%3Ch1%3E%3Ca%20href%3Dhttps://evil.com%3EYour%20password%20is%20currently%20unsafe,%20please%20click%20the%20link%20to%20update%20the%20information%3C/a%3E%3C/h1%3E/

==> Victim enter link and open redirect to evil.com , Attacker can phishing to Retrieve user information.

##FIX: -Whitelist -Filter "<"

Impact

  • Fake notification.
  • Open redirect

The original report as published on HackerOne, by dangkhai0x21. 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 the application reflected user-controlled URL content into the page without encoding or filtering HTML characters.

Impact

The victim could be shown a fake notification and sent to an attacker-controlled site, which the reporter says could be used for phishing; the text does not show any script actually executing.

What the attacker needed

Victim clicks a crafted link

The fix

The reporter suggests using a whitelist and filtering the less-than character, though proper output encoding would be the more robust approach.

How it was found

  1. Craft a URL containing HTML markup in the path.
  2. Send that URL to the victim.
  3. The victim opens the link and the page renders the injected content, showing a fake message and a link to an external site.

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.

Some web pages put part of the address you typed back into the page without cleaning it first. If that text can include HTML, the page will build whatever the attacker wrote, such as a fake warning with a link. The attacker only has to get someone to open a prepared link.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

More from Semrush

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.