Skip to content
XSS Write-up Intermediate

A simple but interesting bug chain..

The search functionality reflected user input inside XML data, and although XXE was ruled out, an XSS payload in XML executed. The self-XSS was turned into reflected XSS by abusing missing CSRF tokens, allowing an attacker to run script in a victim's browser.

bountyoverload Follow

Published on bountyoverload.medium.com

This bug allowed me to perform full account-takeover (ATO) over any administrator on the main web app of a highly used and highly tested website

p4, on bountyoverload.medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the application reflected user input into an XML response without proper output encoding, and lacked CSRF protections on the POST endpoint.

Impact

An attacker could perform full account takeover over any administrator on the main web app, as the author claims.

What the attacker needed

Victim visits a crafted page; attacker can host a page; no CSRF tokens on the endpoint

The fix

The application should encode user input before embedding it in XML responses and implement CSRF tokens on state-changing POST endpoints.

How it was found

  1. Use the search functionality and observe the request in Burp Suite.
  2. Notice that the input is reflected inside XML data in the response.
  3. Try XXE payloads and rule out XXE because the XML parser does not parse user input.
  4. Craft an XSS payload in XML and confirm it executes.
  5. Change the request method from POST to GET, which fails because only POST is accepted.
  6. Abuse the absence of CSRF tokens to turn the self-XSS into reflected XSS.

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 write-up has not been written yet. The Original tab links to the source.

The website took what you typed into a search box and put it directly into a page that was built from XML, a structured data format. Because the site did not clean the input, a script could be hidden in the search text and run in someone else's browser. The author also found that the site did not use CSRF tokens, small checks that stop other websites from making requests on your behalf, which let them turn a harmless self-XSS into an attack on other users.

What is XSS?

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

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.