ElectronApplication · Electronjs

CVE-2026-34765

HIGH · 8.8 CVSS v3.1 Published 2026-04-07
Fix available
A fix is available. Upgrade to 41.1.0 or later.
See remediation →
94/100
Remediation priority · Urgent
Remotely reachable Zero-click

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
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.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

Electron's window.open() improperly scoped named-window lookups to the opener's browsing context group, allowing a renderer to navigate existing child windows opened by unrelated renderers using the same target name. This caused content loaded by the second renderer to inherit the more permissive webPreferences (including privileged preload scripts) from the original child window.

MitigationUpgrade Electron to version 39.8.5, 40.8.5, 41.1.0, or 42.0.0-alpha.5 or later. Audit all setWindowOpenHandler configurations to ensure child windows do not receive elevated privileges like nodeIntegration:true or sandbox:false.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
ElectronApplication
Affected:<= 39.8.4>= 40.0.0, <= 40.8.4>= 41.0.0, < 41.1.0= 41.2.0= 42.0.0

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Determine installed Electron version
    Check the Electron version used in your application. This is typically found in package.json under dependencies or devDependencies, or can be logged at runtime via process.versions.electron in the renderer process.
    Affected if The installed version is 39.8.4 or lower, 40.0.0 through 40.8.4, 41.0.0 through 41.0.x, 41.2.0, or 42.0.0 exactly.
  2. Locate setWindowOpenHandler usage
    Search your codebase for uses of the setWindowOpenHandler API, which is used in the main process to control child window creation. Look for files containing 'setWindowOpenHandler' or 'webContents.setWindowOpenHandler'.
    Affected if Your application uses setWindowOpenHandler to create child windows.
  3. Inspect elevated webPreferences in handler
    Examine the return value of setWindowOpenHandler callbacks. Check the webPreferences object for settings: specifically look for nodeIntegration:true or sandbox:false being set on windows created by the handler.
    Affected if setWindowOpenHandler returns webPreferences with nodeIntegration:true or sandbox:false (these are considered elevated permissions).
  4. Review window.open target names
    Search your codebase for window.open() calls and identify any target name strings used. Look for patterns where the same target name might be reused across different renderer processes or contexts.
    Affected if Multiple renderers use identical target name strings in window.open() calls, creating potential for collision.
  5. Verify context group isolation
    Review whether your application intentionally isolates different renderers into separate browsing context groups. This may require checking BrowserWindow configuration and session settings.
    Affected if Your application does not enforce strict browsing context group separation between different renderer origins or windows.

You are affected if your Electron version falls within the vulnerable ranges AND your application uses setWindowOpenHandler with elevated webPreferences while allowing potential target name collisions across different renderers.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Upgrade available Upgrade to 41.1.0 or later
Fixed in 41.1.0
Interim mitigation

Upgrade Electron to version 39.8.5, 40.8.5, 41.1.0, or 42.0.0-alpha.5 or later. Audit all setWindowOpenHandler configurations to ensure child windows do not receive elevated privileges like nodeIntegration:true or sandbox:false.

Recommended fix High confidence

Electron 39.8.5, 40.8.5, 41.1.0, or 42.0.0-alpha.5 (depending on your current version)

  1. Check your current Electron version by running `npm list electron` or checking package.json
  2. Determine the appropriate upgrade path based on your current version: If <= 39.8.4, upgrade to 39.8.5; If >= 40.0.0 and <= 40.8.4, upgrade to 40.8.5; If >= 41.0.0 and < 41.1.0, upgrade to 41.1.0; If 41.2.0, upgrade to 42.0.0-alpha.5 or later
  3. Update the Electron version in your package.json file
  4. Run `npm install` or `yarn install` to install the new version
  5. Test your application thoroughly, especially any code that uses window.open() and setWindowOpenHandler
  6. Verify that child windows are created with the correct webPreferences and that the vulnerability is mitigated
Caveat Upgrading Electron may introduce breaking changes; review the Electron release notes for your upgrade path and test thoroughly

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Electron Scoped from the published advisory
  • Consultation2.0 h
  • Implementation4.0 h
  • Testing3.0 h
  • Review / QA2.0 h
11.0 hours of engineering $1,930
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $3,088.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2026-34765 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2026-34765 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data