CVE-2026-34780
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 · uneditedElectron is a framework for writing cross-platform desktop applications using JavaScript, HTML and CSS. From versions 39.0.0-alpha.1 to before 39.8.0, 40.0.0-alpha.1 to before 40.7.0, and 41.0.0-alpha.1 to before 41.0.0-beta.8, apps that pass VideoFrame objects (from the WebCodecs API) across the contextBridge are vulnerable to a context isolation bypass. An attacker who can execute JavaScript in the main world (for example, via XSS) can use a bridged VideoFrame to gain access to the isolated world, including any Node.js APIs exposed to the preload script. Apps are only affected if a preload script returns, resolves, or passes a VideoFrame object to the main world via contextBridge.exposeInMainWorld(). Apps that do not bridge VideoFrame objects are not affected. This issue has been patched in versions 39.8.0, 40.7.0, and 41.0.0-beta.8.
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 confidenceElectron versions 39.x, 40.x, and 41.x-beta contain a context isolation bypass where VideoFrame objects from the WebCodecs API, when passed through contextBridge.exposeInMainWorld(), can be exploited by an attacker with JavaScript execution in the main world (e.g., via XSS) to access the isolated preload context and any exposed Node.js APIs.
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>= 39.0.0, < 39.8.0>= 40.0.0, < 40.7.0= 41.0.0CVSS 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
- None
- User interaction
- Required
- Scope
- Changed
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
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 checksWork through these to decide whether this CVE applies to you.
-
Identify installed Electron versionRun `electron --version` in the application environment, or check the version in package.json / package-lock.json, or inspect the electron binary used at runtimeAffected if The version is >= 39.0.0 and < 39.8.0, OR >= 40.0.0 and < 40.7.0, OR equals 41.0.0
-
Verify context isolation is enabledIn the main process code, check the webPreferences object passed to BrowserWindow: look for `contextIsolation: true` and `nodeIntegration: false`Affected if Context isolation is disabled (set to false) or not explicitly set, which would make the bypass more severe, but the vulnerability exists even when enabled due to the VideoFrame bridge flaw
-
Examine preload scripts for VideoFrame bridgingLocate preload script files (usually in a preload/ or similar directory) and search for `contextBridge.exposeInMainWorld()` calls. Inspect whether any expose VideoFrame objects from the WebCodecs APIAffected if Preload scripts use contextBridge.exposeInMainWorld() to bridge VideoFrame objects to the renderer isolated world
-
Check if WebCodecs API is accessible in rendererIn the renderer process, verify if WebCodecs API is available by checking for the `VideoFrame` constructor or running `typeof VideoFrame` in the browser devtools consoleAffected if The renderer has access to VideoFrame from WebCodecs API and the preload script bridges it to the isolated world
-
Audit renderer for XSS vectorsSearch the renderer code for user input handling that could lead to XSS: eval(), innerHTML assignments, script tag injection, event handlers from unsanitized inputAffected if An XSS vulnerability exists in the renderer that could be chained with the VideoFrame bridge to achieve Node.js API access
You are affected if your Electron version falls within the affected ranges AND your preload scripts bridge VideoFrame objects through contextBridge while the renderer has an XSS vulnerability that can interact with the WebCodecs API.
Generated from the published advisory. Verify against your own configuration.
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 · scoped39.8.040.7.0
Upgrade Electron to version 39.8.0, 40.7.0, or 41.0.0-beta.8 or later. Alternatively, audit and remove any VideoFrame object bridging from preload scripts if immediate upgrade is not feasible.
Upgrade to Electron 39.8.0 (for 39.x users), 40.7.0 (for 40.x users), or 41.0.0-beta.8 or later (for 41.x users)
- Identify the current Electron version by checking package.json, package-lock.json, or running 'electron --version' in the application directory
- If using Electron 39.x.x (>=39.0.0, <39.8.0): update the electron version in package.json to ^39.8.0 or higher
- If using Electron 40.x.x (>=40.0.0, <40.7.0): update the electron version in package.json to ^40.7.0 or higher
- If using Electron 41.0.0: update the electron version in package.json to ^41.0.0-beta.8 or higher (or await stable 41.0.0 release)
- Run 'npm install' or 'npm update' to install the new Electron version
- Test the application thoroughly, particularly any code that uses contextBridge.exposeInMainWorld() and VideoFrame objects
- Ensure no other dependencies are broken by the Electron version change
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation2.0 h
- Implementation4.0 h
- Testing4.0 h
- Review / QA2.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $3,328.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2026-34780 — 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 sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2026-34780 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
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.
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.
- 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