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.
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, ...
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
- Generate malformed XSLT stylesheets by mutation fuzzing from a pool of samples.
- Run each stylesheet through the target XSLT engine under a memory checker such as Dr Memory or ASan.
- Minimise any crashing stylesheet by hand.
- 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.