Skip to main content

CVE-2026-34771

HIGH
Use After Free (CWE-416)
2026-04-03 https://github.com/electron/electron GHSA-8337-3p73-46f4
8.8
CVSS 3.1 · NVD
View

Attack ChainAIDerived

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

  1. Access
    User navigates to malicious webpage
  2. Delivery
    Page requests fullscreen/pointer-lock permission
  3. Exploit
    Frame navigates before async handler responds
  4. Execution
    Use-after-free triggered in permission callback
  5. Impact
    Arbitrary code execution or crash

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 application to register an asynchronous session.setPermissionRequestHandler() callback. Victim must interact with fullscreen, pointer-lock, or keyboard-lock permission requests while the requesting frame navigates or window closes during pending handler execution. Synchronous handlers or missing handlers are not vulnerable.

Impact

The CVSS v3.1 score of 7.5 (High) reflects network-based attack vector (AV:N) with high attack complexity (AC:H), requiring user interaction (UI:R) but no privileges (PR:N), with potential for high confidentiality, integrity, and availability impact. However, real-world risk requires careful contextualization. The attack complexity is genuinely high because exploitation depends on precise timing: the attacker must trigger a permission request (fullscreen, pointer-lock, or keyboard-lock), then cause frame navigation or window closure during the narrow window when an asynchronous handler is pending. This is not trivially weaponizable compared to simpler vulnerabilities. No public exploit identified at time of analysis, and EPSS data is unavailable for risk quantification. The vulnerability affects only a subset of Electron applications-those specifically implementing asynchronous permission handlers for these three permission types. Many Electron apps either don't implement custom permission handlers or use synchronous responses. From an SSVC perspective: exploitation status is POC (proof-of-concept feasible but not public), automatable is no (requires user interaction and timing precision), technical impact is significant (memory corruption potential). Priority should be moderate for organizations running affected Electron apps with async permission handlers, but lower for apps using default permission behavior or synchronous handlers.

Exploit ScenarioDerived

An attacker hosts a malicious website containing JavaScript that requests fullscreen permission (or pointer-lock/keyboard-lock) when a victim visits using an Electron-based application vulnerable to this issue and configured with an asynchronous permission handler. The malicious page simultaneously triggers rapid frame navigation or attempts to close the window using JavaScript immediately after requesting the permission. If the timing aligns correctly during the narrow window while the application's asynchronous permission handler is pending, the stored callback dereferences freed memory. This could crash the application or, with sophisticated heap manipulation, potentially allow the attacker to corrupt memory and execute arbitrary code within the application's security context.

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 in Electron framework allows memory corruption when handling fullscreen, pointer-lock, or keyboard-lock permission requests in apps with asynchronous session.setPermissionRequestHandler() callbacks. Affects npm package electron versions prior to 41.0.0-beta.8, 40.7.0, 39.8.0, and 38.8.6. Remote attackers can trigger memory corruption or crashes if the requesting frame navigates or window closes while the permission handler is pending. EPSS data not available; no public exploit identified at time of analysis. Vendor-released patches available across all affected major version branches.

RemediationAI

Application developers using Electron must upgrade the framework dependency to a patched version: 41.0.0-beta.8 or later for the 41.x branch, 40.7.0 or later for the 40.x branch, 39.8.0 or later for the 39.x branch, or 38.8.6 or later for the 38.x branch. Update the Electron dependency in package.json and rebuild the application bundle. For development teams unable to immediately upgrade, implement one of two workarounds: either refactor asynchronous permission handlers to respond synchronously (invoke the callback immediately within the handler function), or modify the handler to unconditionally deny fullscreen, pointer-lock, and keyboard-lock permission requests if asynchronous processing is required for other permission types. Official advisory and patch details available at https://github.com/electron/electron/security/advisories/GHSA-8337-3p73-46f4.

Affected Packages

npm electron fix: 38.8.6, 39.8.0, 40.7.0, 41.0.0-beta.8

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 vulnerability stems from a use-after-free condition (CWE-416) in the Electron framework's permission request handling mechanism. Electron is a framework for building cross-platform desktop applications with web technologies (JavaScript, HTML, CSS). The flaw occurs specifically in the asynchronous callback architecture for session.setPermissionRequestHandler(), which processes permission requests for browser features like fullscreen mode, pointer lock, and keyboard lock. When an application registers an asynchronous permission handler, Electron stores a callback reference to invoke once the permission decision is made. However, if the DOM frame that initiated the request navigates away or the window closes before the callback executes, the stored callback attempts to dereference memory that has already been freed by the frame/window cleanup process. This classic use-after-free condition can lead to memory corruption, potentially allowing an attacker to manipulate memory contents or cause application crashes. The vulnerability only manifests when developers implement asynchronous permission handlers; synchronous handlers execute immediately and avoid this lifecycle timing issue.

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

NVD PRIMARY 8.8 HIGH
AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Red Hat 7.5 HIGH

Primary rating from NVD.

CVSS VectorNVD

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

Lifecycle Timeline

3
CVSS changed
Jun 30, 2026 - 03:24 NVD
7.5 (HIGH) 8.8 (HIGH)
Patch released
Apr 03, 2026 - 08:30 nvd
Patch available
CVE Published
Apr 03, 2026 - 02:40 nvd
HIGH 7.5

DescriptionNVD

Impact

Apps that register an asynchronous session.setPermissionRequestHandler() may be vulnerable to a use-after-free when handling fullscreen, pointer-lock, or keyboard-lock permission requests. If the requesting frame navigates or the window closes while the permission handler is pending, invoking the stored callback dereferences freed memory, which may lead to a crash or memory corruption.

Apps that do not set a permission request handler, or whose handler responds synchronously, are not affected.

Workarounds

Respond to permission requests synchronously, or deny fullscreen, pointer-lock, and keyboard-lock requests if an asynchronous flow is required.

Fixed Versions

  • 41.0.0-beta.8
  • 40.7.0
  • 39.8.0
  • 38.8.6

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

A use-after-free vulnerability in the Electron framework (CVE-2026-34771) affects applications handling fullscreen and permission requests asynchronously, potentially allowing remote attackers to cause memory corruption or application crashes. Organizations using Electron-based applications must upgrade immediately, as this impacts any desktop application built on the framework that processes permission requests, regardless of whether users intentionally grant permissions.

Business Impact: High
Compensating Controls

Vendor-released patch: Upgrade to Electron 41.0.0-beta.8, 40.7.0, 39.8.0, or 38.8.6 or later depending on application version line. Interim mitigation: Restrict or disable fullscreen/pointer-lock/keyboard-lock permission requests in application configuration if business logic permits, and isolate Electron applications from untrusted network content pending patching.

Threat Intelligence Overview

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

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

44
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
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)NVD

pkg:npm/electron
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