CVE-2026-34771: Electron use-after-free in permission request handling

CVE-2026-34771 · Severity: high · CVSS 7.5 · Published 2026-04-04

Electron, a popular framework used to build desktop applications like Slack and Discord, contains a security flaw in how it handles user permissions for features like fullscreen mode or keyboard access. If an application is designed to process these requests slowly (asynchronously), an attacker could potentially cause the application to crash or corrupt its memory by closing a window or navigating away at a specific moment. This could lead to unpredictable behavior or allow for further malicious activity on the user's computer.

Technologies: electron (npm), Red Hat Build of Podman Desktop. Vendors: npm, Red Hat.

Quick answers

Is CVE-2026-34771 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-34771 being exploited in the wild.
How severe is CVE-2026-34771?
High severity, with a CVSS score of 7.5, published 4 April 2026.
Which products and versions are affected?
electron (npm) SEMVER:introduced=0,fixed=38.8.6; Red Hat Build of Podman Desktop 1.
Is there a fix for CVE-2026-34771?
Yes. electron (npm): upgrade to 38.8.6 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-34771 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-34771?
Check whether you run electron (npm) or Red Hat Build of Podman Desktop at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • electron (npm): upgrade to 38.8.6 or later
    npm install electron@38.8.6

Technical details

A use-after-free vulnerability exists in Electron's WebContents permission handling. The flaw occurs when an application registers an asynchronous 'session.setPermissionRequestHandler()' for fullscreen, pointer-lock, or keyboard-lock requests. If the requesting frame navigates or the window closes while the permission handler is still pending, the subsequent invocation of the stored callback dereferences memory that has already been freed. This race condition can result in memory corruption or a process crash. The vulnerability requires the application to use an asynchronous handler; synchronous handlers are not affected. Patches are available in versions 38.8.6, 39.8.0, 40.7.0, and 41.0.0-beta.8.

Affected products

  • ElectronJS Electron < 38.8.6, 39.0.0-alpha.1 to < 39.8.0, 40.0.0-alpha.1 to < 40.7.0, 41.0.0-alpha.1 to < 41.0.0-beta.8
  • Red Hat Red Hat Build of Podman Desktop 1

Identifiers

  • CVE-2026-34771
  • GHSA-8337-3p73-46f4

Timeline

  • 2026-04-02: advisory: GitHub Security Advisory published by Electron team
  • 2026-04-04: disclosed: CVE published to NVD
  • 2026-04-04: patched: Fixes released in multiple Electron branches

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.