ElectronApplication · Electronjs

CVE-2026-34773

HIGH · 7.5 CVSS v3.1 Published 2026-04-04
Fix available
A fix is available. Upgrade to 38.8.6 / 39.8.1 or later.
See remediation →
84/100
Remediation priority · High
Remotely reachable No privileges 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 versions 38.8.6, 39.8.1, 40.8.1, and 41.0.0, on Windows, app.setAsDefaultProtocolClient(protocol) did not validate the protocol name before writing to the registry. Apps that pass untrusted input as the protocol name may allow an attacker to write to arbitrary subkeys under HKCU\Software\Classes\, potentially hijacking existing protocol handlers. Apps are only affected if they call app.setAsDefaultProtocolClient() with a protocol name derived from external or untrusted input. Apps that use a hardcoded protocol name are not affected. This issue has been patched in versions 38.8.6, 39.8.1, 40.8.1, and 41.0.0.

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

In Electron on Windows, the app.setAsDefaultProtocolClient() function does not validate the protocol name parameter before writing to the Windows registry under HKCU\Software\Classes\. An attacker can exploit this by providing a crafted protocol name (e.g., containing path traversal sequences) to write to arbitrary registry subkeys and hijack existing protocol handlers.

MitigationUpdate Electron to versions 38.8.6, 39.8.1, 40.8.1, or 41.0.0 which contain the patch. Applications should also ensure protocol names are never derived from untrusted external input and are hardcoded or strictly validated.

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.1>= 40.0.0, < 40.8.1= 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
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
None

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/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 checks

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

  1. Check installed Electron version
    Run 'npm list electron' or check your package.json for the electron dependency version. On Windows, you can also find it in node_modules/electron/dist/resources/version or by running 'electron --version' in the application directory.
    Affected if The version is less than 38.8.6, OR between 39.0.0 and 39.8.1 (exclusive), OR between 40.0.0 and 40.8.1 (exclusive), OR exactly 41.0.0
  2. Identify use of setAsDefaultProtocolClient
    Search your codebase for calls to app.setAsDefaultProtocolClient() or electron.app.setAsDefaultProtocolClient(). Check all JavaScript and TypeScript source files.
    Affected if The function is called in your application code
  3. Inspect protocol name parameter source
    Review the code around each setAsDefaultProtocolClient() call to determine whether the protocol name argument is hardcoded or derived from external input (user input, environment variables, command-line arguments, file reads, or network data).
    Affected if The protocol name parameter comes from any untrusted external source rather than a hardcoded string literal
  4. Examine registry for unexpected protocol entries
    Open Windows Registry Editor and navigate to HKCU\Software\Classes\. Look for any protocol handler entries with unusual paths or unexpected parent keys that may indicate exploitation, such as entries containing '../' patterns or keys outside the typical protocol format (e.g., 'myprotocol' should be a direct subkey, not a path).
    Affected if There are protocol entries in HKCU\Software\Classes\ with suspicious names or paths that suggest injection attempts

You are affected if your Electron version falls within the vulnerable ranges AND your application passes untrusted input to setAsDefaultProtocolClient(), or if you observe suspicious protocol handler entries in the Windows registry.

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.1 / 40.8.1 or later
Fixed in 38.8.639.8.140.8.1
Interim mitigation

Update Electron to versions 38.8.6, 39.8.1, 40.8.1, or 41.0.0 which contain the patch. Applications should also ensure protocol names are never derived from untrusted external input and are hardcoded or strictly validated.

Recommended fix High confidence

Electron 38.8.6 (for 38.x), 39.8.1 (for 39.x), 40.8.1 (for 40.x), or 41.0.0+ (for 41.x)

  1. 1. Identify the current Electron version in your project by checking package.json or running 'npm list electron'
  2. 2. Determine which major version line you are currently on (38.x, 39.x, 40.x, or 41.x)
  3. 3. Upgrade Electron to the appropriate patched version: For 38.x line upgrade to 38.8.6; For 39.x line upgrade to 39.8.1; For 40.x line upgrade to 40.8.1; For 41.x line upgrade to 41.0.0 or later
  4. 4. Update the Electron version in package.json to the chosen patched version
  5. 5. Run 'npm install' or 'npm update' to install the new Electron version
  6. 6. Rebuild any native modules if necessary using 'electron-rebuild' or similar tools
  7. 7. Test the application thoroughly, particularly any functionality that uses setAsDefaultProtocolClient()
Caveat Minor version upgrades typically have minimal breaking changes; however, always review the Electron release notes for any deprecation warnings or behavior changes between your current version and 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
  • Implementation8.0 h
  • Testing4.0 h
  • Review / QA2.0 h
16.0 hours of engineering $2,800
Get the upgrade done

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

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

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