Skip to content
Memory corruption Write-up Advanced

Mutation-based fuzzing of XSLT engines

The author fuzzed several XSLT engines with malformed stylesheets and found numerous memory-corruption bugs, including out-of-bounds reads, use-after-free, heap overflow and type confusion, in Firefox, Adobe Reader, Chrome/libxslt, Intel SOA and MSXML. An attacker could crash the affected software and, in some cases, potentially execute code or leak memory.

Nicolas Grégoire Follow

Published on agarri.fr

I did in 2011 some research about vulnerabilities caused by the abuse of dangerous features provided by XSLT engines. This leads to a few vulnerabilities (mainly access to the file system or code execution) in Webkit, xmlsec, SharePoint, Liferay, MoinMoin, PostgreSQL, ...

Nicolas Grégoire (@Agarri_FR), on agarri.fr

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

Impact

The bugs could crash the affected products and, in several cases, may allow memory disclosure or code execution, though some were only annoying crashers and Webkit's disabled extensions limited the reach of some libxslt bugs.

What the attacker needed

Victim opens a crafted XSLT or XML file; target runs a vulnerable XSLT engine

The fix

The bugs were fixed by the respective vendors, with Intel removing its product from its website and Chris Evans adding a defensive check in libxml to catch namespace-node type confusion.

How it was found

  1. Generate malformed XSLT stylesheets by mutation fuzzing from a pool of samples.
  2. Run each stylesheet through the target XSLT engine under a memory checker such as Dr Memory or ASan.
  3. Minimise any crashing stylesheet by hand.
  4. Record the crash and, where possible, analyse the root cause.

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.

XSLT is a language used to transform XML documents, and browsers and PDF readers include engines that run it. The researcher fed these engines deliberately broken XSLT files and watched for crashes, which can sometimes be turned into code execution. The bugs are memory-safety mistakes inside the engines, not flaws in the XSLT language itself.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

More by Nicolas Grégoire

View all

8 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.