Cyber Resilience

CVE-2026-34774

Memory Safety in Electronjs Electron ≤ 39.8.1

Published
04 April 2026
Modified
24 July 2026
Patch / advisory
CVSS Score v3.1 8.1
Click a component to see what it means
Raw vectorCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS Score 0.0044 37th percentile
Risk Priority 59 floored blend · peak EPSS

Summary

CVE-2026-34774 is a high-severity Use After Free (CWE-416) vulnerability in Electronjs Electron. Its CVSS base score is 8.1 (High).

Operationally, exploitation aligns with the MITRE ATT&CK technique Exploitation for Privilege Escalation (T1068); ranked at the 37th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog.

The strongest mitigations our analysis identified map to SA-11 (Developer Testing and Evaluation) and SA-8 (Security and Privacy Engineering Principles) — see the control section below for these in your framework.

Deeper analysis AI-assisted summary

Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.

CVE-2026-34774 is a use-after-free vulnerability (CWE-416) in the Electron framework, used for building cross-platform desktop applications with JavaScript, HTML, and CSS. It affects Electron versions prior to 39.8.1, 40.7.0, and 41.0.0, but only applications that enable offscreen rendering via webPreferences.offscreen: true and permit child windows through their setWindowOpenHandler implementation allowing window.open().

The vulnerability arises when a parent offscreen WebContents is destroyed while a child window opened via window.open() remains active, causing subsequent paint frames on the child to dereference freed memory and potentially lead to a crash or memory corruption. Exploitation requires network access (AV:N) with no privileges (PR:N) or user interaction (UI:N), but high attack complexity (AC:H), yielding a CVSS 3.1 score of 8.1 with high impacts on confidentiality, integrity, and availability (C:H/I:H/A:H). Any remote attacker able to influence app behavior under these specific conditions could trigger it.

The Electron security advisory (GHSA-532v-xpq5-8h95) at https://github.com/electron/electron/security/advisories/GHSA-532v-xpq5-8h95 confirms the issue and states that it has been addressed in versions 39.8.1, 40.7.0, and 41.0.0. Applications not using offscreen rendering or denying child windows are unaffected; practitioners should verify and update Electron-based apps to these versions for mitigation.

EU & UK References

Vulnerability Data

Electron is a framework for writing cross-platform desktop applications using JavaScript, HTML and CSS. Prior to versions 39.8.1, 40.7.0, and 41.0.0, apps that use offscreen rendering and allow child windows via window.open() may be vulnerable to a use-after-free. If the…

more

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. This issue has been patched in versions 39.8.1, 40.7.0, and 41.0.0.

CWE(s)

Related Threats

MITRE ATT&CK Enterprise Techniques

T1068 Exploitation for Privilege Escalation Privilege Escalation
Adversaries may exploit software vulnerabilities in an attempt to elevate privileges.
T1203 Exploitation for Client Execution Execution
Adversaries may exploit software vulnerabilities in client applications to execute code.
T1190 Exploit Public-Facing Application Initial Access
Adversaries may attempt to exploit a weakness in an Internet-facing host or system to initially access a network.
T1210 Exploitation of Remote Services Lateral Movement
Adversaries may exploit remote services to gain unauthorized access to internal systems once inside of a network.
T1212 Exploitation for Credential Access Credential Access
Adversaries may exploit software vulnerabilities in an attempt to collect credentials.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2026-34770Same product: Electronjs Electron
CVE-2026-34764Same product: Electronjs Electron
CVE-2026-34772Same product: Electronjs Electron
CVE-2026-34771Same product: Electronjs Electron
CVE-2026-53085Shared CWE-416, CWE-825
CVE-2026-31703Shared CWE-416, CWE-825
CVE-2026-12293Shared CWE-416, CWE-825
CVE-2026-6754Shared CWE-416, CWE-825
CVE-2026-45972Shared CWE-416, CWE-825
CVE-2024-23310Shared CWE-416, CWE-825

Affected Assets

electronjs
electron
41.0.0 · ≤ 39.8.1 · 40.0.0 — 40.7.0

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)

Detect
Catch it (NIST detect / respond)

Harden
Shrink the surface (DISA STIG)
  • 3 hardening rules · 3 OS baselines
Validate
Prove the fix (OWASP ASVS)
  • V1.4.3

Mitigating Controls (NIST 800-53 r5) AI

Developer testing and evaluation can discover use-after-free bugs through dynamic analysis or fuzzing.

Engineering principles can require memory-safe constructs or languages that structurally avoid introducing use-after-free.

Process isolation confines the blast radius of use-after-free memory corruption to a single execution domain.

Memory protection controls limit exploitation impact by blocking unauthorized code execution from dangling pointers.

Mitigating Controls (NIST CSF 2.0) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

PR.PS-06 mostly match
prevents

Secure SDLC practices directly incorporate memory-safety tooling and reviews that prevent most use-after-free defects.

ID.AM-08 partial match
prevents

Lifecycle management includes secure development and maintenance phases that reduce memory-safety defects.

ID.RA-01 partial match
prevents

Vulnerability identification processes can discover use-after-free issues via scanning or analysis but do not prevent their introduction.

PR.PS-02 partial match
prevents

Routine patching removes known use-after-free instances after they have been introduced in released software.

Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

finds

Security testing in development can detect use-after-free bugs before release.

prevents

Secure SDLC mandates memory-safety practices that reduce use-after-free defects.

prevents

Application security requirements can specify memory-management rules that mitigate use-after-free.

prevents

Secure architecture principles include memory-safety design choices that limit use-after-free exposure.

prevents

Secure coding standards directly prescribe avoidance of use-after-free patterns.

prevents

Change-management processes help ensure memory-safety fixes are deployed consistently.

Hardening callouts derived

Configuration rules from DISA STIG baselines that bear on weaknesses of the type cited by this CVE. Each rule is shown with the relationship its mapping actually records, against the CWE it was authored against. Derived via CVE→CWE over `controls_xwalks` (authoritative rows only; rows rated `none` are excluded).

Oracle Linux 8 (1 rule)
  • V-248592 OL 8 must clear memory when it is freed to prevent use-after-free attacks. prevents CWE-416
RHEL 8 (1 rule)
  • V-230279 RHEL 8 must clear memory when it is freed to prevent use-after-free attacks. prevents CWE-416
RHEL 9 (1 rule)
  • V-257794 RHEL 9 must clear memory when it is freed to prevent use-after-free attacks. prevents CWE-416

References