CVE-2026-34765

Electron named window.open targets not scoped to the opener's browsing context

Published Apr 7, 2026 CVSS 3.1 · 6 Medium EPSS < 1% KEV · Not listed
Description
Electron is a framework for writing cross-platform desktop applications using JavaScript, HTML and CSS. Prior to 39.8.5, 40.8.5, 41.1.0, and 42.0.0-alpha.5, when a renderer calls window.open() with a target name, Electron did not correctly scope the named-window lookup to the opener's browsing context group. A renderer could navigate an existing child window that was opened by a different, unrelated renderer if both used the same target name. If that existing child was created with more permissive webPreferences (via setWindowOpenHandler's overrideBrowserWindowOptions), content loaded by the second renderer inherits those permissions. Apps are only affected if they open multiple top-level windows with differing trust levels and use setWindowOpenHandler to grant child windows elevated webPreferences such as a privileged preload script. Apps that do not elevate child window privileges, or that use a single top-level window, are not affected. Apps that additionally grant nodeIntegration: true or sandbox: false to child windows (contrary to the security recommendations) may be exposed to arbitrary code execution. This vulnerability is fixed in 39.8.5, 40.8.5, 41.1.0, and 42.0.0-alpha.5.

Analysis

AI-generated

Technical impact

Electron versions prior to 39.8.5, 40.8.5, 41.1.0, and 42.0.0-alpha.5 fail to isolate named window targets within the same browsing context group. A renderer can navigate an existing child window that was opened by a different, unrelated renderer if both specify the same target name. Because the existing child may have been created with elevated webPreferences—such as a privileged preload script or node integration—this mis‑scoping allows the second renderer to implicitly inherit those higher permissions. An attacker who can control a renderer that opens a target name shared with a privileged window can potentially execute arbitrary code in the context of that elevated child window, leading to serious confidentiality and integrity risks.

Affected Systems

The issue affects applications built with the Electron framework before the specified fixed releases. Impacted apps are those that open multiple top‑level windows with differing trust levels and employ the setWindowOpenHandler API to grant child windows elevated webPreferences. Applications that do not elevate child window privileges, or that use only a single top‑level window, are not affected. If an app also grants nodeIntegration:true or sandbox:false to child windows—contrary to recommended security practices—then the vulnerability could lead to arbitrary code execution.

Risk and Exploitability

The CVSS score of 6.0 indicates moderate severity. No EPSS score is available, and the vulnerability is not listed in KEV. The attack vector is likely local, requiring the attacker to influence the renderer that opens the shared target name. Since the flaw depends on developer configuration choices rather than a generic exploit, successful exploitation would require that an application opens multiple windows with differing permissions and uses the same named target across those windows. Consequently, the risk is significant for misconfigured Electron applications but limited for those following the default security guidelines.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Electron to version 39.8.5, 40.8.5, 41.1.0, 42.0.0-alpha.5 or later, where the bug is fixed.

Generated by OpenCVE AI on April 8, 2026 at 13:22 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-f3pv-wv63-48x8 Electron: Named window.open targets not scoped to the opener's browsing context
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.2.0:*:*:*:*:node.js:*:*
cpe:2.3:a:electronjs:electron:42.0.0:alpha1:*:*:*:node.js:*:*
cpe:2.3:a:electronjs:electron:42.0.0:alpha2:*:*:*:node.js:*:*
cpe:2.3:a:electronjs:electron:42.0.0:alpha3:*:*:*:node.js:*:*
cpe:2.3:a:electronjs:electron:42.0.0:alpha4:*:*:*:node.js:*:*
Vendors & Products Electronjs
Electronjs electron
Type Values Removed Values Added
Metrics ssvc

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

ssvc

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

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': 'partial'}, '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 39.8.5, 40.8.5, 41.1.0, and 42.0.0-alpha.5, when a renderer calls window.open() with a target name, Electron did not correctly scope the named-window lookup to the opener's browsing context group. A renderer could navigate an existing child window that was opened by a different, unrelated renderer if both used the same target name. If that existing child was created with more permissive webPreferences (via setWindowOpenHandler's overrideBrowserWindowOptions), content loaded by the second renderer inherits those permissions. Apps are only affected if they open multiple top-level windows with differing trust levels and use setWindowOpenHandler to grant child windows elevated webPreferences such as a privileged preload script. Apps that do not elevate child window privileges, or that use a single top-level window, are not affected. Apps that additionally grant nodeIntegration: true or sandbox: false to child windows (contrary to the security recommendations) may be exposed to arbitrary code execution. This vulnerability is fixed in 39.8.5, 40.8.5, 41.1.0, and 42.0.0-alpha.5.
Title Electron named window.open targets not scoped to the opener's browsing context
Weaknesses CWE-668
References
Metrics cvssV3_1

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

Weaknesses
  • CWE-653

    Improper Isolation or Compartmentalization

  • CWE-668

    Exposure of Resource to Wrong Sphere

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Apr 13, 2026, 3:37 PM
Reserved
Mar 30, 2026, 7:54 PM
Status
Analyzed
Published
Apr 7, 2026, 10:16 PM
Modified
Jul 24, 2026, 10:10 PM
Severity
Moderate
Public date
Apr 7, 2026, 9:18 PM