ElectronApplication · Electronjs

CVE-2026-34772

HIGH · 8.8 CVSS v3.1 Published 2026-04-04
Fix available
A fix is available. Upgrade to 38.8.6 / 39.8.0 or later.
See remediation →
95/100
Remediation priority · Urgent
Remotely reachable No privileges

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 versions 38.8.6, 39.8.0, 40.7.0, and 41.0.0-beta.8, apps that allow downloads and programmatically destroy sessions may be vulnerable to a use-after-free. If a session is torn down while a native save-file dialog is open for a download, dismissing the dialog dereferences freed memory, which may lead to a crash or memory corruption. Apps that do not destroy sessions at runtime, or that do not permit downloads, are not affected. This issue has been patched in versions 38.8.6, 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 confidence

Use-after-free vulnerability in Electron where destroying a session while a native save-file dialog is open for a download causes freed memory to be dereferenced when the dialog is dismissed, potentially leading to crash or memory corruption.

MitigationUpgrade Electron to version 38.8.6, 39.8.0, 40.7.0, or 41.0.0-beta.8 or later. If upgrade is not immediately feasible, avoid programmatically destroying sessions while download dialogs are pending.

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:< 38.8.6>= 39.0.0, < 39.8.0>= 40.0.0, < 40.7.0= 41.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
None
User interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/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. Identify the installed Electron version
    Run `electron --version` from the application directory, or check the version in package.json under dependencies or devDependencies. Also inspect the lock file (package-lock.json or yarn.lock) for the exact electron version resolved.
    Affected if The version is less than 38.8.6, or falls between 39.0.0 and 39.7.x, or falls between 40.0.0 and 40.6.x, or is exactly 41.0.0.
  2. Determine if the application destroys sessions at runtime
    Search the codebase for calls to `session.fromPartition`, `partition.clearSessionData`, or any code path that calls `session.destroy()`. Review the main process code for dynamic session teardown logic.
    Affected if The application code contains logic that programmatically destroys or clears session objects while the app is running.
  3. Verify if download functionality is enabled
    Search the codebase for `download` event handlers on the webContents or session objects, or check for `will-download` event listeners. Also look for usage of `session.setDownloadPath` or `webContents.downloadURL`.
    Affected if The application has code that handles or initiates downloads, which enables the native save-file dialog to appear.
  4. Inspect for crashes related to dialog dismissal
    Review application crash logs, error reports, or console output for use-after-free errors, memory corruption, or crashes occurring immediately after a save-file dialog is closed during an active download.
    Affected if Crashes or memory errors are logged when dismissing a save dialog during an active download session.

You are affected if your Electron version is within the vulnerable ranges AND your application destroys sessions at runtime AND downloads with save-file dialogs are possible in your app.

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 38.8.6 / 39.8.0 / 40.7.0 or later
Fixed in 38.8.639.8.040.7.0
Interim mitigation

Upgrade Electron to version 38.8.6, 39.8.0, 40.7.0, or 41.0.0-beta.8 or later. If upgrade is not immediately feasible, avoid programmatically destroying sessions while download dialogs are pending.

Recommended fix High confidence

Upgrade to Electron 38.8.6, 39.8.0, 40.7.0, or any version >= 41.0.0-beta.8 (preferably the latest stable release)

  1. 1. Identify the current Electron version in use by checking package.json or node_modules/electron/package.json
  2. 2. If using Electron < 38.8.6, upgrade to version 38.8.6 or later
  3. 3. If using Electron >= 39.0.0 and < 39.8.0, upgrade to version 39.8.0 or later
  4. 4. If using Electron >= 40.0.0 and < 40.7.0, upgrade to version 40.7.0 or later
  5. 5. If using Electron 41.0.0, upgrade to version 41.0.0-beta.8 or later (or the stable 41.x release)
  6. 6. After upgrading, rebuild native modules with electron-rebuild if applicable
  7. 7. Test the application, particularly focusing on download functionality and session lifecycle management
Caveat Minor: Upgrading across major versions may require compatibility testing for APIs; review Electron breaking changes documentation for the target version

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

Fix this in Electron Scoped from the published advisory
  • Consultation2.0 h
  • Implementation2.0 h
  • Testing3.0 h
  • Review / QA1.0 h
8.0 hours of engineering $1,390
Get the upgrade done

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

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2026-34772 — 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-34772 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