Skip to content
XSS Disclosed report Beginner

XSS on redirection page( Bypassed)

The redirect page on semrush.com accepted a URL parameter that could be set to a javascript: URI, allowing script execution in the context of the site. An attacker could craft a link that, when clicked, runs arbitrary JavaScript and can also redirect the user to other sites.

kunal94 Follow

Originally disclosed on HackerOne

  • Triaged in 4 days
  • Fixed in 28 days
  • Paid in 13 days
  • Disclosed after 4 months

Hello Semrush Team, In this report id 311330, I was filled duplicate and redirection url is fixed which made me feel happy as deserving bounty hunter gets a reward.

However, after fixing from last night, I finally bypassed the redirection method which not only Triggered Xss, but also it redirects to somewhere else.

https://www.semrush.com/redirect?url=https://(websitelink)

#To reproduce

So,I tried to craft a XSS like javascript://%0aalert(document.cookie) at the end of redirection Url,so it doesn't work. Afterwards,I encoded %0a to %250a, then modified the payload and injected at the end of url and it works like a charm.

Here are the XSS payloads https://www.semrush.com/redirect?url=javascript://%250Aalert(document.cookie) https://www.semrush.com/redirect?url=javascript://%250Aalert(document.domain)

When a particular user clicks the button,it's going to triggered an XSS.

Now,Here comes the tricky part regarding Unvalidated redirection-

Now if you inject javascript://%250Aalert(document.location="https://google.com",document.location="https://www.facebook.com") at the end of url like this

https://www.semrush.com/redirect?url=javascript://%250Aalert(document.location="https://google.com",document.location="https://www.facebook.com")

and a particular user click go to site,first page will popup google.com and then it's going to redirect to facebook.com.

Please Consider it and let me know.

With Regards Kunal

(Attaching with Single POC ) F263582

Impact

An attacker can perform dangerous attacks using XSS.

Attachments

proof.png
proof.png From the original on HackerOne

The original report as published on HackerOne, by kunal94. 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

Impact

An attacker could execute JavaScript in a victim's browser when they click a crafted link, and redirect them to other sites.

What the attacker needed

Victim clicks a crafted link

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.

What is XSS?

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

More by kunal94

View all

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

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.