Skip to content
XSS Disclosed report Beginner

Reflected XSS using Header Injection

The application echoed the Referer header value into its response without proper encoding, allowing an attacker to inject JavaScript. An attacker could craft a request that executes script in a victim's browser within the site's session.

inferno- Follow

Originally disclosed on HackerOne

  • Triaged in 6 days
  • Fixed in 7 days
  • Paid in 13 days
  • Disclosed after 37 days

Host : www.semrush.com

Path : /billing-admin/profile/subscription/?l=de

Payload : c5obc'+alert(1)+'p7yd5

Steps to reproduce :

Request Header :

GET /billing-admin/profile/subscription/?l=de HTTP/1.1 Host: www.semrush.com Accept: / Accept-Language: en User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0) Connection: close Referer: http://www.google.com/search?hl=en&q=c5obc'+alert(1)+'p7yd5

Overview :

The payload c5obc'+alert(1)+'p7yd5 was submitted in the Referer HTTP header. Payload is copied from a request and echoed into the application's immediate response in an unsafe way.

Impact

Reflected cross-site scripting vulnerabilities arise when data is copied from a request and echoed into the application's immediate response in an unsafe way. An attacker can use the vulnerability to construct a request that, if issued by another application user, will cause JavaScript code supplied by the attacker to execute within the user's browser in the context of that user's session with the application.

Attachments

Semrush_XSS.png
Semrush_XSS.png From the original on HackerOne
Semrush_Video_POC.mp4

The original report as published on HackerOne, by inferno-. 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 construct a request that, if issued by another user, would cause attacker-supplied JavaScript to execute in that user's browser within the context of their session with the application.

What the attacker needed

Victim issues a request with the crafted Referer header

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.

When you visit a website, your browser sends a 'Referer' header telling the site where you came from. This site took that header value and put it directly into the page without cleaning it. That means an attacker could make a link that, when clicked, runs malicious JavaScript in the victim's browser as if it came from the site itself.

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 inferno-

View all

1 more disclosed report, 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.