Skip to content
XXE Write-up Intermediate

$5,005 worth vulnerability Duplicated, How I loose $5,005 in a day? Denial of Service - Billion LAUGH Attack (XXE)

The application allowed SVG file uploads and processed the embedded XML with a parser that expanded entities, so a crafted SVG using the Billion Laughs entity expansion caused the server to consume excessive memory. An attacker could upload such a file and trigger a denial of service when it was opened.

Muhammad Asim Shahzad Follow

Published on web.archive.org

{{media:0}}

protector47, on web.archive.org

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 XML parser was configured to expand nested entities without limits, and the application accepted SVG files that contain XML.

Impact

The server could be made to consume almost 3 gigabytes of memory, causing a denial of service; the text does not say whether other users were affected or how long the service was down.

What the attacker needed

Ability to upload an SVG file; the uploaded file is opened or processed

The fix

The application should block SVG, XML and HTML uploads, disable DTDs, and limit entity expansion, parse depth, input size and parse time.

How it was found

  1. Upload an SVG file containing a Billion Laughs entity expansion payload.
  2. Open the uploaded file so the server processes the XML entities.
  3. The server expands billions of entities and runs out of memory.

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.

XML is a text format used to store and send structured data. Some XML parsers can be tricked into expanding small definitions into enormous amounts of text, which uses up all the server's memory and makes it stop responding. This is called a denial of service because legitimate users can no longer use the service.

What is XXE?

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

More by Muhammad Asim Shahzad

View all

6 more disclosed reports, best first.

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.