December 4, 2026 13 min read

CVE-2026-125350: How an XSLT Stylesheet Crashes Chrome and Why It Could Do Much Worse

Kshitij Nalawade, Prathamesh Shingare, Kedar Shashikant Pandit, Amol Swami Lat61 Threat Intelligence Team
CVE-2026-125350: How an XSLT Stylesheet Crashes Chrome and Why It Could Do Much Worse

Introduction: A Browser Bug Hidden in Plain XML

In the last eighteen months, browser security has been defined less by zero-days in JavaScript engines and more by vulnerabilities in the older, quieter subsystems that browsers carry for compatibility: XML parsers, font rasterizers, PDF renderers, media decoders. These components are written in C or C++, they predate modern memory-safe idioms, and they run inside the same renderer process as the rest of the page.

CVE-2026-125350 illustrates this pattern. It is a heap use-after-free vulnerability in libxslt, a C library for applying XSLT stylesheets to XML documents that Chrome bundles inside its renderer. The vulnerability carries a CVSS 3.1 score of 8.8 (High), with the potential to impact confidentiality, integrity, and availability. Google’s advisory, published 2026-11-09, confirms that an exploit existed in the wild before the patch shipped.

This write-up examines the underlying vulnerability, drawing on Chromium’s publicly available source code, regression tests, and previously published research. We explore the cache design that enables the bug, the lazy evaluation that triggers it, and the security implications of the resulting memory corruption.

Why RCE in a Browser Renderer Is a Critical-Tier Event

Remote code execution means an unauthenticated attacker can execute arbitrary instructions in the context of the victim’s process, in this case, Chrome’s renderer — purely by having the victim navigate to a URL. No credential, no download prompt, no JavaScript interaction required. The attack surface is the page load itself. For an enterprise, successful code execution within a browser renderer could expose sensitive data accessible to that renderer and, when combined with additional exploitation capabilities, provide a beachhead for a broader intrusion.

The renderer sandbox limits the immediate blast radius to the browser process, but that containment is conditional on there being no sandbox escape bug in the attacker’s toolkit — a bar that well-resourced threat actors can often clear. Google has confirmed the bug was exploited in the wild before the patch shipped, and CISA has added it to its Known Exploited Vulnerabilities catalog, making prompt patching the only complete fix at the time of disclosure.

The Broader Context: Chrome's 2026 Zero-Day Record

CVE-2026-125350 is the eighth Chrome zero-day exploited in the wild in 2026, arriving at a rate of roughly one confirmed exploitation per six weeks across the year. The seven that preceded it span distinct subsystems and attack surfaces, underscoring that no single component accounts for the exposure:

  • CVE-2026-2441, CVE-2026-3909, CVE-2026-3910 — patched in the first half of 2026, all confirmed to be exploited in the wild.
  • CVE-2026-5281, CVE-2026-11645 — mid-year disclosures, both actively exploited at time of patching.
  • CVE-2026-85046, CVE-2026-87491 — patched in Q3 2026, exploited in the wild before fixes were available.
  • CVE-2026-125350 — the subject of this writeup; the eighth, and the first confirmed exploited zero-day in Chrome’s XML processing stack.

The consistent cadence is significant. It reflects sustained, well-resourced research against Chrome’s renderer.

The past eighteen months have seen a string of renderer-reachable memory corruption bugs in browser subsystems:

  • XML/HTML parsing and transformation: libxslt (this CVE), libxml2 (multiple CVEs in 2025), Blink’s legacy HTML parser (use-after-free in table layout code, exploited in the wild, 2025).
  • Font handling: FreeType and HarfBuzz bugs reachable from web fonts, several rated High, two confirmed exploited in the wild in 2025–2026.
  • Image decoding: Heap overflows in WebP (CVE-2023-4863 and its successors), AVIF, and JPEG-XL decoders, all reachable by loading an image with no user interaction beyond the page load.
  • Media pipelines: Use-after-free and integer overflow bugs in FFmpeg-derived code reachable from <video> and <audio> elements, with multiple in-the-wild confirmations in 2025.

Background: XSLT in Chrome's Renderer

XSLT (Extensible Stylesheet Language Transformations) is a language used to transform XML documents into other formats, such as HTML, plain text, or even a different XML structure. Chrome supports XSLT natively, without any plugin or flag. When Chrome loads an XML document that contains a processing instruction of the form:

the browser fetches transform.xsl, parses it, and runs the transform against the XML document. The result is then rendered in place of the raw XML. The entire pipeline runs inside the renderer process, the sandboxed process that handles page content.

Why This Attack Surface Is Passive

Most browser attack surfaces require JavaScript to be active, or require the user to interact with a file upload dialog, a form, or a download prompt. XSLT processing requires none of these. The trigger is the HTTP response:

  1. The user opens a URL.
  2. The server responds with an XML document containing an xml-stylesheet processing instruction.
  3. The browser automatically fetches the stylesheet and runs the transform.
  4. The bug fires inside the transform.

It also means the trigger cannot be blocked by disabling JavaScript, a common mitigation for browser exploits. The only effective client-side controls are the XSLTEnabled enterprise policy (which disables XSLT processing entirely) and keeping Chrome updated.

The Vulnerable Function: xsltTestCompMatchDirect()

The bug lives in a single function in pattern.c. To understand what breaks, we first need to understand what the function is trying to accomplish.

The Cache

An XSLT stylesheet can include patterns like:

The count attribute is a compiled pattern, a rule that says “count nodes matching this shape.” During a transform, libxslt evaluates that pattern against potentially thousands of nodes. To avoid re-running full XPath evaluation on every node, libxslt caches the result: after evaluating the pattern against a document, it stores the resulting XPath node-set object (an xmlXPathObjectPtr) in a slot of the transform context, alongside the document it was computed for. The next time the same pattern runs against the same document, it uses the cached result.

What xsltTestCompMatchDirect() Does

This function is a performance shortcut specifically for patterns with two predicates in a row, like book[p][q]. In pseudocode:

The critical line is the local variable copy at the top. cached_obj is now just a pointer holding a memory address. It points to the same heap block that the slot also points to.

This design is correct only if xmlXPathEval() does not modify the slot between the copy and the free. However, it does.

Why xmlXPathEval() Can Re-Enter the Same Slot

libxslt evaluates global variables lazily, this means that a variable’s body is computed only the first time something reads its value. Until that moment, the variable has no allocation and no computed result.

When the XPath evaluator encounters a variable reference like $inner while evaluating the pattern, it calls xsltXPathVariableLookup(). If $inner has not been computed yet, that function calls xsltEvalGlobalVariable(), which runs the variable’s XSLT body right then and there, mid-evaluation, deep in the call stack.

If that variable body contains an xsl:number using the same count pattern (and therefore the same cache slot), xsltTestCompMatchDirect() is entered a second time, recursively.

The nested call takes its own copy of the slot, re-evaluates because the node is in yet another document, frees the cached object, and installs a new one in the slot. It returns normally.

Control returns to the outer call. xmlXPathEval() returns. The outer call now:

  1. Calls xmlXPathFreeObject(cached_obj), but cached_obj points to a heap block where the nested call is already freed. This is the use-after-free. xmlXPathFreeObject() reads the type field of the freed struct  a 4-byte read on freed memory.
  2. Depending on what the allocator did with the block in the meantime, it may also attempt to free the nodesetval pointer inside the freed struct, and then free the block itself a second time the double free.

The Two Trigger Shapes

For the reentrancy to cause a double free, a stale object must already be in the cache slot when the outer call enters. The problem is that xsl:number normally clears its cache slot after every use. So you need a structural trick in the stylesheet that leaves an object behind. There are exactly two such tricks, corresponding to the two shapes in the fix commit’s crash test.

Shape 1: Union Pattern (a | b)

A union pattern like nothing | book[@lang=’b’][predicate] matches either alternative. libxslt’s cache clearing function, xsltCompMatchClearCache(), clears only the first alternative (nothing). The second alternative book[@lang=’b’][predicate]  keeps its cached node-set object between calls. That leftover object is the stale pointer the outer call will copy.

The PoC stylesheet exploits this directly:

Shape 2: Import Slot Collision

When a stylesheet imports another stylesheet with <xsl:import>, libxslt shifts the cache slot numbers of template patterns in the imported stylesheet to avoid conflicts. It does not shift the slot numbers of xsl:number count patterns. This means a count pattern in a second imported stylesheet can be assigned the same slot number as a template pattern from the first import, a slot that is populated by template matching and never cleared by the xsl:number machinery.

Why These Two Shapes Matter

Both shapes can appear in legitimate stylesheets. The union pattern is common in complex DocBook and DITA transforms that number mixed content. Import-based slot collision is harder to trigger accidentally but can appear in any stylesheet that imports two or more specialized modules. The fix commit’s regression test uses both shapes, confirming that both were considered live exploit vectors.

From UAF to Exploitation

The public PoC demonstrates a reliable renderer crash. The disclosed impact confirmed by Google’s advisory is code execution inside the renderer sandbox. The gap between a crash and controlled code execution is the exploit engineering problem. This section describes the primitive chain at a conceptual level.

The Double Free and Heap Corruption

When the double free fires, Chrome’s allocator (PartitionAlloc) ends up with the same 72-byte memory slot appearing twice in its internal freelist  the linked list of available slots. This means the next two same-size allocations both return the same address. Two separate parts of the program now hold pointers to the same region of memory, each believing it has exclusive ownership. This is called an overlapping allocation.

With an overlapping allocation, an attacker who controls what lands in one of the two slots can feed carefully crafted data to whatever C code reads the other. Because the freed object is an xmlXPathObject, a struct whose fields include type identifiers and further pointers reading attacker-controlled bytes through the struct’s field layout is enough to redirect subsequent memory operations to attacker-chosen addresses.

Primitive Chain

The overlapping allocation is the foundation. From it, a standard exploitation chain in a Chromium renderer proceeds through several escalating primitives: leveraging the allocator’s behavior to obtain a write to an arbitrary heap address; using that write to corrupt an internal V8 object (such as an ArrayBuffer’s backing store pointer) to gain arbitrary read/write across the renderer’s address space; and finally overwriting a code pointer, a JIT buffer or a C++ vtable entry to redirect execution.

An information leak to defeat ASLR is a prerequisite: UAFs are useful here too, since the bytes of a freed slot often contain allocator metadata that reveals a live heap address.

What Makes This Reliable

Three properties make the double free in this bug particularly useful compared to simpler heap corruption:

  1. Deterministic trigger: The reentrancy is not timing-dependent; it is structural, guaranteed by the stylesheet’s control flow.
  2. Known size: The freed object is always a 72-byte xmlXPathObject. The spray targets exactly one PartitionAlloc bucket.
  3. Controlled delay: The stylesheet controls exactly when the global variable is evaluated (by when it is first read), giving a window to spray the heap before the double free fires.

The Fix

The fix is nine lines added to pattern.c, landed in Chromium’s release branch on 2026-11-07 under the commit message “[M157-mini] Fix use-after-free in libxslt direct pattern match cache”.

The change is simple. Instead of relying on the pointer copied before xmlXPathEval(), the outer call re-reads the cache slot after the evaluation completes, frees whatever is now in the slot, and stores the new object:

By the time the fixed code calls xmlXPathFreeObject(), it reads the slot as it stands after the evaluation which may already have been updated by a nested call. If the nested call freed the original object and installed a new one, the outer call frees the new one (which is correct, the outer call is about to replace it with new_obj anyway). No stale pointer survives.

The Pattern Behind the Bug

CVE-2026-125350 is not an outlier. It represents a category of vulnerability that browser vendors have been working to close for years and that attackers have been systematically exploiting: memory corruption in C-language parser and codec libraries bundled inside renderer processes.

The specific pattern here, reentrancy through lazy evaluation corrupting a cache is a subtle variant of a classic mistake. The mistake is reading a shared mutable state into a local variable and treating that local variable as still valid after calling out to code that may modify the state. This mistake is common in C because C has no mechanism to enforce that a local copy is a snapshot rather than an alias. In Rust, the borrow checker makes this class of bug a compile error. In C, it requires the programmer to reason about every reachable call path from every call site, an increasingly untenable requirement as codebases grow.

Recent Chrome Use-After-Free Vulnerabilities (2026)

CVE-2026-125350 is one of six use-after-free bugs patched in Chrome across this release window. The concentration across distinct subsystems – XML, CSS, layout, graphics, accessibility, and service workers illustrates how broadly UAF vulnerabilities are distributed in a browser’s codebase, and why no single hardening control covers the full surface.

CVE Subsystem Type
CVE-2026-125350 XML processing (libxslt) Use-After-Free
CVE-2026-126885 ServiceWorker Use-After-Free
CVE-2026-126895 CSS Use-After-Free
CVE-2026-126879 Layout Use-After-Free
CVE-2026-126846 Skia (graphics) Use-After-Free
CVE-2026-126911 Accessibility Use-After-Free

Each of these is reachable from renderer-level content without elevated privilege. Within this patch batch, CVE-2026-125350 is the only one with confirmed in-the-wild exploitation at time of patching.

This CVE is Chrome’s eighth actively exploited zero-day of 2026. The seven that preceded it – CVE-2026-2441, CVE-2026-3909, CVE-2026-3910, CVE-2026-5281, CVE-2026-11645, CVE-2026-85046, and CVE-2026-87491 were all patched across earlier Chrome stable releases this year.

One exploited zero-day roughly every six weeks, all year. It means Chrome is a consistent, high-priority target for attackers with the resources to find and weaponise these bugs

For Users

The fix ships in Chrome 157.0.8103.50, released 2026-11-09. Users on 157.0.8103.38 or earlier are vulnerable. Chrome’s auto-update mechanism delivers the patch automatically on most installs. Enterprise deployments that delay or disable auto-update should treat this as a priority patch given the confirmed in-the-wild exploitation.

Mitigations

Control Effect Notes
Update to Chrome 157.0.8103.50+ Eliminates the vulnerability The only complete fix
XSLTEnabled enterprise policy set to Disabled Prevents the browser from processing XSLT at all Breaks XSLT-based intranet apps; test before deploying
Block outbound requests to untrusted XML sources at the proxy Reduces attack surface Does not protect against XSLT from trusted origins

References

Keep reading