Skip to content
XSS Disclosed report Beginner

Cross Site Scripting (XSS) – Reflected

A request parameter was echoed unmodified into a double-quoted HTML attribute, allowing an attacker to inject arbitrary JavaScript. An attacker could execute script in a victim's browser to steal cookies, make requests as the victim, prompt malware downloads, or deface the site.

jayhanspara Follow

Originally disclosed on HackerOne

  • Triaged in 43 hours
  • Fixed in 8 months
  • Disclosed after 2.0 years

Reflected Cross-site Scripting (XSS) occur when an attacker injects browser executable code within a single HTTP response.When a web application is vulnerable to this type of attack, it will pass unvalidated input sent through requests back to the client.

**The value of request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks.The input was echoed unmodified in the application's response. This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response. **

Vulnerable Link : https://www.███/

In the attachment you can find the request, response and the screenshot of vulnerability.

Step-by-step Reproduction Instructions

  1. copy the request of Vulnerable URL and send it to the repeater tab in burp suite .
  2. Hit on the go button of the repeater's sub tab and will find the response.
  3. Right click with in the response tab and click on show response on browser and click on the copy button
  4. Paste the copied URL in the web browser you will find the popup which display the domain of the website.

Suggested Mitigation/Remediation Actions

Input should be validated as strictly as possible on arrival, given the kind of content that it is expected to contain. For example, personal names should consist of alphabetical and a small range of typographical characters, and be relatively short; a year of birth should consist of exactly four numerals; email addresses should match a well-defined regular expression. Input which fails the validation should be rejected, not sanitized. User input should be HTML-encoded at any point where it is copied into application responses. All HTML metacharacters, including < > " ' and =, should be replaced with the corresponding HTML entities (< > etc).

Impact

Impact

Cookie Stealing - A malicious user can steal cookies and use them to gain access to the application.
Arbitrary requests - An attacker can use XSS to send requests that appear to be from the victim to the web server.
Malware download - XSS can prompt the user to download malware. Since the prompt looks like a legitimate request from the
 site, the user may be more likely to trust the request and actually install the malware.
Defacement - attacker can deface the website usig javascript code.

The original report as published on HackerOne, by jayhanspara. 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 copied a request parameter into an HTML attribute without validating or encoding it, so metacharacters could break out of the attribute.

Impact

An attacker could steal cookies to gain access, send requests as the victim, prompt malware downloads, or deface the site; the text does not mention any defence that limited the exploit.

The fix

Input should be strictly validated on arrival and rejected if invalid, and user input should be HTML-encoded wherever it is copied into responses, replacing metacharacters with entities.

How it was found

  1. Copy the request of the vulnerable URL and send it to the repeater tab in Burp Suite.
  2. Click the Go button in the repeater sub-tab to see the response.
  3. Right-click in the response tab, choose to show the response in a browser, and click the copy button.
  4. Paste the copied URL into a web browser to see a popup displaying the website's 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.

When a website takes input from a request and puts it directly into the page without cleaning it, an attacker can include code that the browser runs. This is called reflected cross-site scripting because the input is reflected back in the response.

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 U.S. Dept Of Defense

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.