CVE-2026-34765: Electron named window.open targets not scoped to the opener's browsing context

Published Apr 7, 2026
·
Updated

Impact 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.

Workarounds Deny window.open() in renderers that load untrusted content by returning { action: 'deny' } from setWindowOpenHandler. Avoid granting child windows more permissive webPreferences than their opener.

Fixed Versions 42.0.0-alpha.5 41.1.0 40.8.5 39.8.5

For more information If you have any questions or comments about this advisory, email us at security@electronjs.org

Other sources

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.

MITRE

Affected Software

12 affected componentsFixes available
npm/electron>=42.0.0-alpha.1<42.0.0-alpha.5
42.0.0-alpha.5
npm/electron>=41.0.0-alpha.1<41.1.0
41.1.0
npm/electron>=40.0.0-alpha.1<40.8.5
40.8.5
npm/electron<39.8.5
39.8.5
electronjs Electron Node.js<=39.8.4
electronjs Electron Node.js>=40.0.0<=40.8.4
electronjs Electron Node.js>=41.0.0<41.1.0
electronjs Electron Node.js=41.2.0
electronjs Electron Node.js=42.0.0-alpha1
electronjs Electron Node.js=42.0.0-alpha2
electronjs Electron Node.js=42.0.0-alpha3
electronjs Electron Node.js=42.0.0-alpha4

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/electron to a version that resolves this vulnerability.

    Fixed in 42.0.0-alpha.5
  2. Upgrade

    Upgrade npm/electron to a version that resolves this vulnerability.

    Fixed in 41.1.0
  3. Upgrade

    Upgrade npm/electron to a version that resolves this vulnerability.

    Fixed in 40.8.5
  4. Upgrade

    Upgrade npm/electron to a version that resolves this vulnerability.

    Fixed in 39.8.5
  5. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 39.8.5
  6. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 40.8.5
  7. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 41.1.0
  8. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 42.0.0-alpha.5
  9. Configuration

    In renderers that load untrusted content, deny window.open() by returning { action: 'deny' } from setWindowOpenHandler.

    Electron renderer setWindowOpenHandler (window.open policy) = { action: 'deny' }
  10. Configuration

    Do not grant child windows more permissive webPreferences than their opener when using setWindowOpenHandler/overrideBrowserWindowOptions.

    Electron (window.open child windows) webPreferences passed via setWindowOpenHandler overrideBrowserWindowOptions = Avoid granting more permissive webPreferences than the opener
  11. Compensating control

    Avoid granting child windows more permissive webPreferences such as nodeIntegration: true or sandbox: false; adhere to Electron security recommendations to reduce risk of arbitrary code execution.

Event History

Apr 7, 2026
Advisory Published
via GitHub·03:52 PM
Data Sourced
via GitHub·03:52 PM
DescriptionSeverityWeaknessAffected Software
CVE Published
via MITRE·09:18 PM
Data Sourced
via MITRE·09:18 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·10:16 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·10:16 PM
Affected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203