Skip to content
XSS Disclosed report Beginner

Reflected XSS in qsurvey.mozilla.com

A reflected cross-site scripting vulnerability existed in a survey page on qsurvey.mozilla.com. An attacker could inject HTML and JavaScript through a POST parameter, which was reflected without proper encoding, allowing script execution in the context of the domain.

bogdan.calin Follow

Originally disclosed on Mozilla

  • Fixed in 45 days
  • Paid in 51 days
  • Disclosed after 45 days
Text
A Reflected XSS vulnerability exists in the website qsurvey.mozilla.com at the following URL https://qsurvey.mozilla.com/s3/Firefox-Downloader-Survey-2017-BATM/.

To reproduce, please visit the following URL using Firefox:
http://bugs.harisec.com/mozilla-8973243/3434.html

This repro URL will automatically submit a form via POST to trigger the XSS payload.
A popup should appear as proof that JavaScript execution is possible in the context of the domain  qsurvey.mozilla.com.

The value of the POST parameter "sgE-3641054-1-6-comments" (the name may vary) is reflected in the response without proper encoding or filtering. The reflection point is inside a <textarea> tag but it's possible to escape the HTML tag context and inject additional HTML tags.

The reproduction URL will generate the following HTML response:

...

<label for="sgE-3641054-1-6-comments">Comments								</label>
			</div>
			<div class="sg-comment-wrapper">
				<textarea id="sgE-3641054-1-6-comments" name="sgE-3641054-1-6-comments" class="sg-input sg-input-essay sg-input-comment" cols="40" rows="3">31337</textarea><img src=x onerror=alert(document.domain)></textarea>
			</div>

...

As you can see it was possible to inject an additional HTML tag <img src=x ...>

If you want to reproduce without my repro url, please follow the next steps:

1. Visit the following URL using Firefox:
https://qsurvey.mozilla.com/s3/Firefox-Downloader-Survey-2017-BATM/

2. In the comments section enter the following:
31337</textarea><img src=x onerror=alert(document.domain)>

3. Click the Next button.

4. A popup should appear displaying the document domain.

The original report as published on Mozilla's Bugzilla, by bogdan.calin. Images and videos are our own copies; raw HTML is shown as text. View it on Mozilla's Bugzilla.

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

The application reflected user-supplied input from a POST parameter into an HTML textarea without proper encoding, allowing the attacker to break out of the textarea and inject arbitrary HTML tags.

Impact

An attacker could execute arbitrary JavaScript in the context of qsurvey.mozilla.com, potentially stealing cookies or performing actions on behalf of the victim.

What the attacker needed

Victim visits a crafted URL or submits a form

How it was found

  1. Visit the survey URL using Firefox.
  2. In the comments section, enter a payload that closes the textarea and injects an image tag with an onerror handler.
  3. Click the Next button.
  4. A popup appears displaying the document domain.

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.

This is a type of bug called reflected cross-site scripting (XSS). It happens when a website takes something you type (like a comment) and puts it back on the page without cleaning it first. An attacker can type special code that the website then runs as if it were part of the site, which can let them do things like steal your session or act as you.

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 Mozilla

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.