Skip to content
XXE Write-up Intermediate

Unveiling CSRF-to-XSS and XXE in a Single Request

A request carried a base64-encoded XML value that the server parsed and echoed back inside another XML structure. The researchers used this to trigger an XXE that read system files and to inject an SVG with a script handler that executed as XSS.

medium.com

Published on medium.com

Bug bounty is a battle, and every bug hunter is a warrior. Here’s how we triumphed in one such fight.

nocley, on 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 server parsed attacker-supplied XML with external entities enabled and rendered the returned XML as markup without sanitising it.

Impact

An attacker could read system files and execute script in a victim's browser, and the files read contained clear-text passwords.

What the attacker needed

Ability to send the crafted request; victim interaction for the XSS

How it was found

  1. Find a request containing a base64-encoded data value
  2. Decode the value and observe it is XML
  3. Send the request and note the response wraps it in another XML structure
  4. Inject an XML string with an SVG script handler to trigger XSS
  5. Inject external entities to read system files

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 app accepted a blob of text that was really XML, a structured data format, and processed it on the server. Because the server trusted that data, the researchers could make it fetch local files (XXE) and could slip in a script that ran in a victim's browser (XSS).

What is XXE?

An XML parser resolves entities the attacker defines, reading local files or making the server send requests.

Similar reports

View all

Same bug class and techniques, clearest first.

XML external entities (XXE)

The lesson behind this report.

An XML parser resolves entities the attacker defines, reading local files or making the server send requests.