Skip to main content

Microsoft CVE-2026-34774

HIGH
Use After Free (CWE-416)
2026-04-03 https://github.com/electron/electron GHSA-532v-xpq5-8h95
8.1
CVSS 3.1 · Vendor: https://github.com/electron/electron
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Enable offscreen rendering in WebPreferences
  2. Delivery
    Open child window via window.open()
  3. Exploit
    Destroy parent WebContents while child remains
  4. Execution
    Child window paint frame dereferences freed memory
  5. Impact
    Trigger use-after-free vulnerability

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Memory lifecycle management
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Privilege Escalation

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Requires Electron application with offscreen rendering enabled (webPreferences.offscreen: true) and setWindowOpenHandler configured to permit child windows via window.open(). Attacker must trigger parent WebContents destruction while child window remains open. No user interaction required for exploitation.

Impact

The CVSS v3.1 score of 8.1 (High) reflects the severe potential impact (code execution, memory corruption) but is tempered by high attack complexity (AC:H). The vulnerability requires the confluence of specific application configuration choices: offscreen rendering enabled, child windows permitted, precise timing of parent destruction while child remains open, and the child window actively painting. The attack vector is network-based (AV:N) and requires no authentication (PR:N) or user interaction (UI:N), which elevates theoretical risk. However, real-world exploitability is constrained by the AC:H rating-attackers must identify vulnerable Electron applications with this specific configuration pattern and trigger the precise destruction/paint timing. No public exploit identified at time of analysis and no CISA KEV listing indicates this is not currently being exploited in the wild. The SSVC framework would likely classify this as medium priority: exploitation status is none, automatable is no (requires specific app configuration discovery), technical impact is total (memory corruption/code execution). The primary risk is to developers who built Electron applications with offscreen rendering enabled for specialized use cases like server-side rendering, automated testing, or headless browser functionality. Most standard Electron desktop applications do not use offscreen rendering, significantly limiting the vulnerable population. Organizations should prioritize patching if they deploy custom Electron applications, but the narrow configuration requirement reduces urgency compared to broadly exploitable vulnerabilities.

Exploit ScenarioDerived

An attacker identifies a web application built with vulnerable Electron that uses offscreen rendering for server-side page generation or automated testing and permits user-initiated window.open() calls. The attacker crafts a malicious web page that, when loaded in the offscreen renderer, opens a child window via window.open() and then triggers destruction of the parent WebContents through application-specific actions (such as navigating away, closing a session, or triggering a cleanup routine). While the child window remains open and continues paint operations, it dereferences the freed parent memory. By controlling the timing and content of subsequent paint frames, the attacker could potentially corrupt memory to hijack control flow and achieve arbitrary code execution within the Electron application's process space, bypassing normal browser sandboxing. No public exploit code exists, and successful exploitation requires deep knowledge of Electron internals, precise timing control, and heap layout manipulation techniques.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Apr 03, 2026

Use-after-free memory corruption in Electron framework (versions <39.8.1, <40.7.0, <41.0.0) allows unauthenticated remote attackers to potentially execute arbitrary code when offscreen rendering is enabled and child windows are permitted. The vulnerability triggers when a parent offscreen WebContents is destroyed while child windows remain active, causing subsequent paint operations to dereference freed memory. EPSS data not available; no public exploit identified at time of analysis. Fixed versions released by vendor.

RemediationAI

Vendor-released patches are available across all affected version branches. Upgrade to Electron version 41.0.0 or later for the 41.x branch, version 40.7.0 or later for the 40.x branch, or version 39.8.1 or later for the 39.x branch. Organizations should update to the latest patched version within their current major version to maintain compatibility while addressing the vulnerability. For applications that cannot immediately upgrade, implement defensive workarounds by modifying the setWindowOpenHandler to deny child window creation from offscreen renderers, or implement lifecycle management to ensure all child windows are explicitly closed before destroying parent WebContents objects. Review application code for patterns where offscreen WebContents might be destroyed without proper child window cleanup. Consult the official security advisory at https://github.com/electron/electron/security/advisories/GHSA-532v-xpq5-8h95 for additional implementation guidance. For questions regarding remediation strategies, contact the Electron security team at security@electronjs.org.

Affected Packages

npm electron fix: 39.8.1, 40.7.0, 41.0.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in npm

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

This is a classic use-after-free vulnerability (CWE-416) in Electron's offscreen rendering implementation. Electron, a framework for building cross-platform desktop applications using web technologies, provides an offscreen rendering mode that allows applications to render web content without displaying it on screen. The vulnerability occurs in the memory management layer when a parent WebContents object configured with 'webPreferences.offscreen: true' is destroyed while child windows opened via 'window.open()' remain alive. The child window's subsequent paint frame operations attempt to access the parent's freed memory region, leading to a dangling pointer dereference. This affects the npm package 'pkg:npm/electron' across multiple major version branches. The issue is specific to applications that both enable offscreen rendering AND allow child window creation through their 'setWindowOpenHandler' configuration-a relatively narrow attack surface that limits exposure to specific application architectures.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/electron/electron) PRIMARY 8.1 HIGH
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Red Hat 8.1 HIGH

Primary rating from Vendor (https://github.com/electron/electron).

CVSS VectorVendor: https://github.com/electron/electron

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

2
Patch released
Apr 03, 2026 - 08:30 nvd
Patch available
CVE Published
Apr 03, 2026 - 02:42 nvd
HIGH 8.1

DescriptionCVE.org

Impact

Apps that use offscreen rendering and allow child windows via window.open() may be vulnerable to a use-after-free. If the parent offscreen WebContents is destroyed while a child window remains open, subsequent paint frames on the child dereference freed memory, which may lead to a crash or memory corruption.

Apps are only affected if they use offscreen rendering (webPreferences.offscreen: true) and their setWindowOpenHandler permits child windows. Apps that do not use offscreen rendering, or that deny child windows, are not affected.

Workarounds

Deny child window creation from offscreen renderers in your setWindowOpenHandler, or ensure child windows are closed before the parent is destroyed.

Fixed Versions

  • 41.0.0
  • 40.7.0
  • 39.8.1

For more information

If there are any questions or comments about this advisory, please email [security@electronjs.org](mailto:security@electronjs.org)

Executive ViewAI

Why It Matters

CVE-2026-34774 is a high-severity use-after-free vulnerability in Electron framework that enables unauthenticated remote code execution when offscreen rendering is enabled with child windows permitted. Organizations using Electron versions 39.x (before 39.8.1), 40.x (before 40.7.0), or 41.x are at immediate risk of application compromise through malicious content or crafted payloads, potentially affecting desktop applications that process untrusted data or host web content.

Business Impact: High
Compensating Controls

Vendor-released patch: Electron 39.8.1, 40.7.0, or 41.0.0 or later. If immediate patching is not feasible, disable offscreen rendering in Electron configuration and restrict child window creation to trusted sources only; however, these controls do not eliminate risk and patching is required.

Threat Intelligence Overview

EPSS Score
0.0%
Top 87% exploitable
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High
NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

40
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +40
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

Use-after-free vulnerabilities occur when a program continues to access memory through a pointer after that memory has been deallocated.

Memory corruption occurs when a program writes data beyond the boundaries of allocated memory regions or accesses memory in unintended ways, violating the integrity of the process's address space.

Affected Products (CPE)CVE.org

pkg:npm/electron
pkg:npm/electron
pkg:npm/electron

Related Vulnerabilities in Electron Multiple Use-After-Free Flaws

View all 4

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy