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.
- 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:
[...]
<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(){//
[...]
<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
- 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.
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
- Visit the vulnerable page with a crafted parameter value that breaks out of the JavaScript string and adds an alert.
- 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.