Microsoft
CVE-2026-34774
HIGH
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessEnable offscreen rendering in WebPreferences
-
DeliveryOpen child window via window.open()
-
ExploitDestroy parent WebContents while child remains
-
ExecutionChild window paint frame dereferences freed memory
-
ImpactTrigger 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 ( |
| 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
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
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Primary rating from Vendor (https://github.com/electron/electron).
CVSS VectorVendor: https://github.com/electron/electron
Lifecycle Timeline
2DescriptionCVE.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.040.7.039.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
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.
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
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.
What every action level means
SSVC AssessmentENISA
Priority Score
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.
GHSA-532v-xpq5-8h95
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB