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.
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
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
- Craft a URL containing HTML markup in the path.
- Send that URL to the victim.
- 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.