CVE-2026-34770

Electron: Use-after-free in PowerMonitor on Windows and macOS

Published Apr 3, 2026 CVSS 3.1 · 7 High EPSS < 1% KEV · Not listed
Description
Electron is a framework for writing cross-platform desktop applications using JavaScript, HTML and CSS. Prior to versions 38.8.6, 39.8.1, 40.8.0, and 41.0.0-beta.8, apps that use the powerMonitor module may be vulnerable to a use-after-free. After the native PowerMonitor object is garbage-collected, the associated OS-level resources (a message window on Windows, a shutdown handler on macOS) retain dangling references. A subsequent session-change event (Windows) or system shutdown (macOS) dereferences freed memory, which may lead to a crash or memory corruption. All apps that access powerMonitor events (suspend, resume, lock-screen, etc.) are potentially affected. The issue is not directly renderer-controllable. This issue has been patched in versions 38.8.6, 39.8.1, 40.8.0, and 41.0.0-beta.8.

Analysis

AI-generated

Technical impact

Electron applications that register for powerMonitor events are vulnerable to a use-after-free flaw (CWE‑416). The bug occurs when the native PowerMonitor object is garbage‑collected while the OS‑level resources it created—such as a Windows message window or a macOS shutdown handler—retain dangling references. A subsequent session‑change event on Windows or system shutdown on macOS dereferences freed memory, potentially causing a crash or memory corruption.

Affected Systems

The vulnerability affects Electron releases prior to 38.8.6, 39.8.1, 40.8.0, and 41.0.0‑beta.8. All desktop applications built with the Electron framework that consume powerMonitor events—suspend, resume, lock‑screen, etc.—are potentially impacted. The defect resides in Electron’s core and is present on both Windows and macOS platforms.

Risk and Exploitability

The CVSS score of 7.0 indicates high severity. EPSS data is not available and the vulnerability is not listed in the CISA KEV catalog, implying no publicly documented exploits. Based on the description, it is inferred that the likely attack vector involves triggering a system session‑change event or a shutdown, which typically would require local or privileged access. Therefore, while the impact of a crash or memory corruption could be significant, the likelihood of exploitation is limited to environments where an attacker can manipulate these OS‑level events.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update Electron to version 38.8.6, 39.8.1, 40.8.0, 41.0.0‑beta.8, or any later release that contains the patch.
  • Verify that powerMonitor events continue to function correctly after the upgrade to confirm the fix.
  • If an upgrade is not immediately possible, avoid using the powerMonitor module or ensure that all listeners are removed before the application terminates to prevent dangling references.
  • Continuously monitor Electron security advisories for updates or additional guidance.

Generated by OpenCVE AI on April 4, 2026 at 03:51 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-jjp3-mq3x-295m Electron: Use-after-free in PowerMonitor on Windows and macOS
History
Type Values Removed Values Added
First Time appeared Electronjs
Electronjs electron
CPEs cpe:2.3:a:electronjs:electron:*:*:*:*:*:node.js:*:*
cpe:2.3:a:electronjs:electron:41.0.0:alpha1:*:*:*:node.js:*:*
cpe:2.3:a:electronjs:electron:41.0.0:alpha2:*:*:*:node.js:*:*
cpe:2.3:a:electronjs:electron:41.0.0:alpha3:*:*:*:node.js:*:*
cpe:2.3:a:electronjs:electron:41.0.0:alpha4:*:*:*:node.js:*:*
cpe:2.3:a:electronjs:electron:41.0.0:alpha5:*:*:*:node.js:*:*
cpe:2.3:a:electronjs:electron:41.0.0:alpha6:*:*:*:node.js:*:*
cpe:2.3:a:electronjs:electron:41.0.0:beta1:*:*:*:node.js:*:*
cpe:2.3:a:electronjs:electron:41.0.0:beta2:*:*:*:node.js:*:*
cpe:2.3:a:electronjs:electron:41.0.0:beta3:*:*:*:node.js:*:*
cpe:2.3:a:electronjs:electron:41.0.0:beta4:*:*:*:node.js:*:*
cpe:2.3:a:electronjs:electron:41.0.0:beta5:*:*:*:node.js:*:*
cpe:2.3:a:electronjs:electron:41.0.0:beta6:*:*:*:node.js:*:*
cpe:2.3:a:electronjs:electron:41.0.0:beta7:*:*:*:node.js:*:*
Vendors & Products Electronjs
Electronjs electron
Type Values Removed Values Added
First Time appeared Electron
Electron electron
Vendors & Products Electron
Electron electron
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description Electron is a framework for writing cross-platform desktop applications using JavaScript, HTML and CSS. Prior to versions 38.8.6, 39.8.1, 40.8.0, and 41.0.0-beta.8, apps that use the powerMonitor module may be vulnerable to a use-after-free. After the native PowerMonitor object is garbage-collected, the associated OS-level resources (a message window on Windows, a shutdown handler on macOS) retain dangling references. A subsequent session-change event (Windows) or system shutdown (macOS) dereferences freed memory, which may lead to a crash or memory corruption. All apps that access powerMonitor events (suspend, resume, lock-screen, etc.) are potentially affected. The issue is not directly renderer-controllable. This issue has been patched in versions 38.8.6, 39.8.1, 40.8.0, and 41.0.0-beta.8.
Title Electron: Use-after-free in PowerMonitor on Windows and macOS
Weaknesses CWE-416
References
Metrics cvssV3_1

{'score': 7, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Apr 8, 2026, 3:55 AM
Reserved
Mar 30, 2026, 7:54 PM
Status
Analyzed
Published
Apr 4, 2026, 12:16 AM
Modified
Jul 24, 2026, 10:10 PM