Skip to content
XSS Disclosed report Beginner

Reflected XSS on █████████

A reflected parameter was inserted into a JavaScript string without proper sanitisation, allowing an attacker to break out of the string and execute arbitrary JavaScript. An attacker could steal data or run JavaScript in the victim's browser.

pdbx Follow

Originally disclosed on HackerOne

  • Triaged in under an hour
  • Fixed in 3 months
  • Disclosed after 4 months

Summary

Reflected XSS on █████.

Description

The page █████ has a reflected parameter ██████████. The parameter is used in a javascript function. For example for requesting http://█████████/?█████████=chron0x the javascript is as follows:

JavaScript
[...]
<script>
	//alert('boo');
    function clickit(){
        var █████████ = 'chron0x';
        if (██████████!==''){
            //alert(████████);
            $('#'+████████).click();
            //alert(████);
	    }
    }
</script>
[...]

Due to improper input sanitization, this is vulnerable to XSS. The payload ?█████=';}alert("chron0x"); function clickit(){//

JavaScript
[...]
<script>
	//alert('boo');
    function clickit(){
        var ████ = '';
    }
    alert("chron0x"); 
    function clickit(){//';
        if (██████████!==''){
            //alert(██████████);
            $('#'+██████████).click();
            //alert(████████);
	    }
    }
</script>
[...]

pops an alert box, demonstrating XSS.

Note: I am reporting this here, since the footer of ████ states Official United States ███████ Website. The ████████ █████., and the United States ██████████ underlies the DoD. If this should not belong to the DoD scope I would kindly ask to self close this issue.

Step-by-step Reproduction Instructions

  1. Visit http://█████/?██████=%27;}alert(%22chron0x%22);%20function%20clickit(){//

An alert box with chron0x pops.

Mitigation/Remediation Actions

Sanitize the input for the ███████ parameter, such that certain characters are encoded or not allowed.

Impact

Data can be stolen, or Javascript can be executed.

The original report as published on HackerOne, by pdbx. 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, potentially stealing data.

What the attacker needed

Victim clicks a crafted link

The fix

The parameter should be sanitised so that special characters are encoded or rejected.

How it was found

  1. Visit the vulnerable page with a crafted parameter value that breaks out of the JavaScript string and adds an alert.
  2. Observe that an alert box with the chosen text pops up.

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.

The website took a value from the URL and placed it directly inside a script without cleaning it. By including special characters, an attacker can close the script's string and add their own code, which then runs in the visitor's browser. This is called cross-site scripting (XSS).

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 pdbx

View all

6 more disclosed reports, best first.

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.