CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-2763

CVE-2026-2763: Use-After-Free in SpiderMonkey Generator for-in Loops

Alon Barad
Alon Barad
Software Engineer

Sep 3, 2026·6 min read·25 visits

Executive Summary (TL;DR)

A use-after-free in Mozilla's SpiderMonkey engine allows unauthenticated attackers to perform a 1-bit memory corruption, altering bytecode to achieve an out-of-bounds read/write primitive.

A critical use-after-free vulnerability exists in the SpiderMonkey JavaScript engine of Mozilla Firefox and Thunderbird. The flaw occurs when a generator object containing an active for-in loop is garbage-collected before the loop's iterator scope is finalized. This leaves a dangling pointer in the compartment's active enumerators list, allowing attackers to corrupt memory and execute arbitrary code.

Vulnerability Overview

CVE-2026-2763 is a critical use-after-free (UAF) vulnerability inside the garbage collection and iteration management subsystems of SpiderMonkey, the JavaScript engine powering Mozilla Firefox and Thunderbird.

The issue stems from a structural mismatch between the lifecycles of JavaScript Generators and standard for-in loop iterators. Under normal conditions, an active iterator is tightly bound to its execution frame and is unlinked when the scope exits.

However, when a loop is paused by a yield statement inside a generator, the engine suspends execution while keeping the iterator active in memory. If the generator is garbage-collected before resumption, the underlying iterator is freed. The compartment list retains a reference to this deallocated memory, leading to a classic dangling pointer scenario.

Because this vulnerability resides inside the core JS engine, it can be triggered remotely without authentication. An attacker can exploit this issue by delivering a malicious webpage that executes crafted JavaScript, compromising the host browser process.

Root Cause Analysis

To manage the execution of a for-in loop, the SpiderMonkey engine maintains a doubly-linked list of active enumerators within each execution compartment.

When a loop starts, the interpreter issues a JSOP::Iter bytecode instruction. This invokes the internal ValueToIterator routine, which allocates a PropertyIteratorObject and registers its corresponding NativeIterator block in the global active list via RegisterEnumerator.

When the loop naturally terminates or is aborted by a break statement, the compiler generates a JSOP::EndIter instruction. This instruction executes CloseIterator, which unlinks the iterator from the active compartment list and safely reclaims its structures. The active enumerators list is therefore kept free of inactive or dead iterator records during standard execution flows.

If the loop runs inside a JavaScript Generator, the generator can suspend execution at a yield boundary. When the generator yields, control leaves the frame without exiting the loop scope, meaning CloseIterator is not executed. If the parent execution context then abandons all references to the generator, the garbage collector identifies the generator and its frame stack as dead memory and sweeps them during the next GC cycle. While the PropertyIteratorObject wrapper is finalized, the raw NativeIterator structure is not unlinked from the compartment's active list, resulting in a use-after-free state.

Code Path & Patch Analysis

To prevent the dangling pointer, the patch implements strict tracking of active iterators within suspended generator frames, ensuring they are systematically unlinked when the generator itself is destroyed or garbage-collected. The vulnerability resides in how generator garbage collection previously ignored unlinking raw NativeIterator pointers.

Below is a representation of how the fix is integrated into the generator object finalization process. The revised logic ensures that the active iterator is invalidated before the associated memory space is swept by the allocator.

// Vulnerable Flow in value representation:
// When GC occurs, the PropertyIteratorObject is swept but ni->unlink() is never called.
 
// Patched Flow:
// The engine ensures that active iterators are unlinked when a generator is finalized.
void JSGeneratorObject::finalize(JSFreeOp* fop, JSObject* obj) {
    JSGeneratorObject* gen = &obj->as<JSGeneratorObject>();
    if (gen->isSuspended()) {
        // Unlink all active iterators bound to the suspended frame
        UnlinkActiveIteratorsInFrame(fop, gen->getStackFrame());
    }
}

This modification closes the escape path by linking generator object destruction directly with iterator registration lifecycles. By ensuring that any associated iteration contexts are closed during finalization, the dangling reference is completely avoided. Security audits confirm that this fix covers all variant generator states including early termination and exceptional aborts.

Exploitation & 1-Bit Write Primitive

The exploitation process hinges on turning the deallocated NativeIterator memory into a highly controlled write primitive. Because the target object is allocated in js::MallocArena rather than the standard GC heap, an attacker must spray structures of comparable size inside the same allocator. The ideal candidate is ImmutableScriptData, which holds compiled JavaScript bytecode and constants.

When a property deletion occurs later on any object in the compartment, the engine invokes SuppressDeletedPropertyHelper. This function walks the active enumerators list and encounters the dangling pointer. When it attempts to modify the deleted property using cursor->markDeleted(), it performs a bitwise-OR operation on a specific bit inside the memory space now occupied by ImmutableScriptData.

This bit corruption targets the operand of the JSOP::InitElemArray bytecode instruction. In array initialization, this instruction retrieves a 32-bit index representing the initialized length. Corrupting this index value forces the engine to call setDenseInitializedLength with an excessively high value. This extends the logical boundary of the array far beyond its physically allocated buffer size, creating a direct out-of-bounds read and write primitive.

Impact Assessment

The security impact of CVE-2026-2763 is critical, as it provides a reliable vector for remote code execution (RCE) in user-space applications. By obtaining an out-of-bounds read and write primitive inside the SpiderMonkey JS engine, an attacker bypasses standard web security boundaries and gains full access to the browser's process memory space.

Once the out-of-bounds primitive is established, the attacker can locate adjacent JIT-compiled code blocks, corrupt function pointers, or modify memory structures to execute shellcode. This bypasses address space layout randomization (ASLR) and control flow integrity (CFI) protections built into the platform.

This vulnerability has been assigned a CVSS score of 9.8, indicating maximum severity. It requires no user interaction or elevated privileges to execute, making it highly attractive for chaining with local privilege escalation vulnerabilities to fully compromise the target operating system. While it is not currently recorded in the CISA KEV catalog, its high reliability makes it a critical patching priority.

Mitigation & Remediation

Remediation requires updating all affected browser and mail client installations immediately. The vulnerability has been addressed in Mozilla Firefox 148, Firefox ESR 115.33, Firefox ESR 140.8, Thunderbird 148, and Thunderbird ESR 140.8. Upgrading to these versions ensures the patch is enforced across all endpoints.

For systems where immediate updates are not possible, administrators should consider temporary mitigation steps to reduce the exposure surface. Restricting the execution of untrusted external JavaScript payloads is highly recommended. Implementing high-security browser configurations that disable non-essential compiler options can also reduce the likelihood of successful exploitation.

Additionally, employing sandbox containerization around the browser processes limits the post-exploitation capabilities of an attacker. Preventing a compromise of the browser process from translating into a complete host takeover reduces the severity of potential active exploitation campaigns in corporate environments.

Technical Appendix

CVSS Score
9.8/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS Probability
0.47%
Top 61% most exploited

Affected Systems

Mozilla FirefoxMozilla Firefox ESRMozilla ThunderbirdMozilla Thunderbird ESR

Affected Versions Detail

Product
Affected Versions
Fixed Version
Firefox
Mozilla
< 148148
Firefox ESR
Mozilla
< 115.33115.33
Firefox ESR
Mozilla
< 140.8140.8
Thunderbird
Mozilla
< 148148
Thunderbird ESR
Mozilla
< 140.8140.8
AttributeDetail
CWE IDCWE-416
Attack VectorNetwork (Unauthenticated)
CVSS v3.1 Score9.8
EPSS Score0.00469
Exploit StatusProof-of-Concept
CISA KEV StatusNot Listed

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
CWE-416
Use After Free

Referencing memory after it has been freed, which can lead to program crashes, data corruption, or execution of arbitrary code.

Known Exploits & Detection

GitHubProof-of-Concept demonstrating use-after-free and array capacity corruption via generator scope collection

References & Sources

  • [1]Mozilla Foundation Security Advisory (Firefox ESR 115.33)
  • [2]Mozilla Foundation Security Advisory (Firefox 148)
  • [3]Mozilla Bugzilla Bug 2012018
  • [4]Public Proof of Concept Repository

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•2 minutes ago•CVE-2026-109619
9.2

CVE-2026-109619: Remote Code Execution in PHP Core via Stale Global State Memory Corruption (PHP2Shell)

CVE-2026-109619 (PHP2Shell) is a critical Use-After-Free vulnerability in the core PHP engine caused by improper global state cleanup during out-of-memory exception handling across persistent worker requests.

Alon Barad
Alon Barad
1 views•6 min read
•5 minutes ago•CVE-2026-113721
4.5

CVE-2026-113721: Unsafe Link Resolution in virtualenv File Generation

In Python virtualenv prior to version 21.14.9, activation script generators and configuration writers use Path.exists() before writing files. Because Path.exists() resolves symbolic links, it returns False for dangling symlinks. Consequently, virtualenv skips unlinking pre-planted symbolic links or hard links, writing data directly to target locations outside the intended virtual environment directory.

Amit Schendel
Amit Schendel
1 views•5 min read
•9 days ago•CVE-2026-87697
8.8

CVE-2026-87697: Untrusted Deserialization in .NET PresentationCore Clipboard Handling

A remote code execution vulnerability exists in Microsoft .NET due to untrusted data deserialization within the PresentationCore component. The flaw stems from implicit auto-conversion flags during clipboard data retrieval operations.

Alon Barad
Alon Barad
31 views•5 min read
•9 days ago•CVE-2026-70007
8.8

CVE-2026-70007: Out-of-Bounds Write Vulnerability in .NET Framework and WPF Subsystem

An out-of-bounds write vulnerability in Microsoft .NET Framework, .NET runtime, and Visual Studio allows unauthenticated remote attackers to execute arbitrary code via crafted pixel-shader bytecode or auto-converted clipboard payloads.

Amit Schendel
Amit Schendel
19 views•6 min read
•10 days ago•CVE-2026-70186
7.5

CVE-2026-70186: ASP.NET Core Denial of Service Vulnerability via Framework Deadlock

ASP.NET Core contains a thread deadlock vulnerability (CWE-833) that allows an unauthenticated remote attacker to cause a denial of service over the network by exhausting server thread pool resources.

Amit Schendel
Amit Schendel
18 views•5 min read
•10 days ago•CVE-2026-70035
8.8

CVE-2026-70035: Insecure Deserialization Remote Code Execution in Microsoft .NET Framework and .NET Runtime

CVE-2026-70035 is a high-severity Remote Code Execution (RCE) vulnerability in Microsoft .NET Framework, .NET runtime, and Visual Studio caused by improper handling during the deserialization of untrusted data (CWE-502). An unauthenticated attacker can execute arbitrary code within the context of the affected process by delivering a crafted serialized payload.

Amit Schendel
Amit Schendel
24 views•6 min read