CVE-2026-34771: 
JavaScript vulnerability analysis and mitigation

Overview

CVE-2026-34771 is a use-after-free (UAF) vulnerability in the Electron framework affecting WebContents fullscreen, pointer-lock, and keyboard-lock permission callbacks. It was published on April 2–3, 2026, by the Electron security team (GitHub user VerteDinde) and assigned GHSA-8337-3p73-46f4. Affected versions include all Electron releases before 38.8.6, 39.x before 39.8.0, 40.x before 40.7.0, and 41.x alpha/beta releases before 41.0.0-beta.8. Applications that do not register an asynchronous session.setPermissionRequestHandler() are not affected. The vulnerability carries a CVSS v3.1 base score of 7.5 (High) per the official advisory (GitHub Advisory, Electron Advisory).

Technical details

The root cause is a use-after-free condition (CWE-416) in Electron's handling of asynchronous session.setPermissionRequestHandler() callbacks. When an application registers an asynchronous permission handler for fullscreen, pointer-lock, or keyboard-lock requests, Electron stores a callback referencing the requesting frame's memory. If the requesting frame navigates away or the window closes while the handler is still pending, the stored callback is later invoked against already-freed memory, leading to a dereference of a dangling pointer. Exploitation requires user interaction (e.g., a user visiting a malicious page that triggers a permission request) and high attack complexity, as the attacker must time the frame navigation or window close to coincide with the pending asynchronous callback (GitHub Advisory, Electron Advisory).

Impact

Successful exploitation can result in application crashes (denial of service) or memory corruption within the Electron process. Memory corruption may be further leveraged to achieve arbitrary code execution in the context of the Electron application, potentially exposing sensitive data processed by the app and compromising integrity. Given that Electron applications often run with elevated local privileges and access to Node.js APIs, a successful exploit could have significant impact on confidentiality, integrity, and availability of the host system (GitHub Advisory, Electron Advisory).

Exploitability

There is no public proof-of-concept exploit and no evidence of in-the-wild exploitation as of the time of this report. The EPSS score is approximately 0.02% (6th percentile), indicating a low near-term exploitation probability. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. No threat actor attribution has been reported (GitHub Advisory, Electron Advisory).

Exploitation steps

  1. Identify a target application: Find an Electron-based application that registers an asynchronous session.setPermissionRequestHandler() and is running a vulnerable version (< 38.8.6, 39.x < 39.8.0, 40.x < 40.7.0, or 41.x < 41.0.0-beta.8).
  2. Craft a malicious web page: Create a page that triggers a fullscreen, pointer-lock, or keyboard-lock permission request (e.g., via document.documentElement.requestFullscreen() or document.body.requestPointerLock()).
  3. Induce the race condition: While the asynchronous permission handler is pending (i.e., the app has not yet called the callback), cause the requesting frame to navigate to another URL or close the window — for example, via a rapid window.location redirect or window.close() call immediately after the permission request.
  4. Trigger the use-after-free: When the application's asynchronous callback is eventually invoked, it dereferences the now-freed memory associated with the navigated/closed frame, causing a crash or memory corruption.
  5. Leverage memory corruption: With a carefully crafted heap layout, an attacker may be able to control the freed memory region to redirect execution flow, potentially achieving arbitrary code execution within the Electron process (GitHub Advisory, Electron Advisory).

Indicators of compromise

  • Process: Unexpected crashes or restarts of Electron-based applications, particularly following fullscreen, pointer-lock, or keyboard-lock permission prompts.
  • Logs: Application crash dumps or core files referencing WebContents permission callback code paths; crash reports mentioning use-after-free or invalid memory access in Electron's renderer or browser process.
  • Network: Unusual outbound connections from the Electron application process following a permission request interaction, which could indicate post-exploitation activity.
  • File System: Unexpected files written by the Electron application process (e.g., shell scripts, executables) in user-writable directories, potentially indicating code execution following memory corruption exploitation.

Mitigation and workarounds

Electron has released patched versions addressing this vulnerability: 38.8.6, 39.8.0, 40.7.0, and 41.0.0-beta.8. All application developers using Electron should upgrade to the appropriate patched release for their branch immediately. As a temporary workaround if upgrading is not immediately possible, developers should respond to permission requests synchronously rather than asynchronously, or explicitly deny fullscreen, pointer-lock, and keyboard-lock requests when an asynchronous flow is required. IBM has also issued a security bulletin for MongoDB Enterprise Advanced products that bundle affected Electron versions (Electron Advisory, IBM Bulletin).

Community reactions

The advisory was published by Electron maintainer VerteDinde on April 2, 2026, and quickly propagated across vulnerability tracking platforms. Social media activity was observed on Mastodon and Bluesky shortly after disclosure, with automated CVE tracking accounts noting the advisory. No significant independent researcher commentary or major media coverage has been identified beyond standard vulnerability database aggregation (GitHub Advisory).

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

RHEL / CentOS

Unknown

Source: This report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-gvwc-5hr5-44p8HIGH7.5
  • JavaScript logoJavaScript
  • probe-image-size
NoYesOct 26, 2026
GHSA-5jh3-w3fj-6758LOW3.7
  • JavaScript logoJavaScript
  • probe-image-size
NoYesOct 26, 2026
GHSA-5v8x-rm7w-m4c7LOW3.7
  • JavaScript logoJavaScript
  • probe-image-size
NoYesOct 26, 2026
GHSA-7pqp-3q23-mwr8LOW3.7
  • JavaScript logoJavaScript
  • probe-image-size
NoYesOct 26, 2026
GHSA-3qg4-7mq2-gm93MEDIUMN/A
  • JavaScript logoJavaScript
  • probe-image-size
NoYesOct 26, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management