Skip to content
XSS Disclosed report Beginner

Improper Neutralization of Input During Web Page Generation

A reflected cross-site scripting vulnerability exists in the search functionality of a web application, where user-supplied input is echoed back without proper sanitisation. An attacker could craft a malicious link that, when clicked by a victim, executes arbitrary JavaScript in the victim's browser, potentially stealing session cookies or performing actions on their behalf.

null_rhythm Follow

Originally disclosed on HackerOne

  • Triaged in 10 hours
  • Fixed in 58 days
  • Disclosed after 8 months

Summary: Cross-site scripting (XSS) vulnerabilities occur when:

1. Untrusted data enters a web application, typically from a web request.
2. The web application dynamically generates a web page that contains this untrusted data. 

Description:

Impact

Once the malicious script is injected, the attacker can perform a variety of malicious activities. The attacker could transfer private information, such as cookies that may include session information, from the victim's machine to the attacker. The attacker could send malicious requests to a web site on behalf of the victim, which could be especially dangerous to the site if the victim has administrator privileges to manage that site.

Step-by-step Reproduction Instructions

  1. From the Search Center of █████████ for example [https://www.███/Home/Search?searchDomain=flagship&tag=1%20mlg]
  2. By Searching for "alert(String.fromCharCode(88,83,83))//--%0D%0A%3E%3C/SCRIPT%3E%22%3E%27%3E%3CSCRIPT%3Ealert(String.fromCharCode(88,83,83))%3C/SCRIPT%3E&redirect=%27%3Balert(String.fromCharCode(88,83,83))//%27%3Balert(String.fromCharCode(88,83,83))//%22%3B%0D%0Aalert(String.fromCharCode(88,83,83))//%22%3Balert(String.fromCharCode(88,83,83))//--%0D%0A%3E%3C/SCRIPT%3E%22%3E%27%3E%3CSCRIPT%3Ealert(String.fromCharCode(88,83,83))%3C/SCRIPT%3E&token=%27%3Balert(String.fromCharCode(88,83,83))//%27%3Balert(String.fromCharCode(88,83,83))//%22%3B%0D%0Aalert(String.fromCharCode(88,83,83))//%22;"
  3. Cross-site scripting (XSS) vulnerabilities occurs

Product, Version, and Configuration (If applicable)

Web Server IIS Operating System Windows Server JavaScript Libraries jQuery3.2.1 jQuery Migrate3.0.0 jQuery UI1.12.1

Suggested Mitigation/Remediation Actions

Strategy: Input Validation

Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a whitelist of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.

Impact

The server reads data directly from the HTTP request and reflects it back in the HTTP response. Reflected XSS exploits occur when an attacker causes a victim to supply dangerous content to a vulnerable web application, which is then reflected back to the victim and executed by the web browser.

The original report as published on HackerOne, by null_rhythm. 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 steal session cookies or perform actions on behalf of the victim, especially if the victim has administrative privileges.

What the attacker needed

Victim clicks a crafted link

The fix

The application should validate all input using an allowlist approach, rejecting or transforming any input that does not strictly conform to specifications.

How it was found

  1. Navigate to the search page of the target application.
  2. Enter a crafted payload containing script tags into the search parameters.
  3. The search reflects the payload, indicating XSS.

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 type something into a search box, the website often shows it back to you, like 'Results for: your search'. If the site doesn't clean that text first, an attacker can put code in the search box instead of normal words. When someone else clicks a link with that code, their browser runs it as if it were part of the website, which can let the attacker steal their login or do things as them.

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.