Skip to main content

Microsoft CVE-2026-34773

HIGH
Improper Input Validation (CWE-20)
2026-04-03 https://github.com/electron/electron GHSA-mwmh-mq4g-g6gr
7.5
CVSS 3.1 · NVD
View

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V2 - Validation and Business Logic Input validation, allowlisting
Impact

The CVSS score of 4.7 with a vector of AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:N reflects a local attack vector requiring low privileges and high complexity to exploit, with high integrity impact but no confidentiality or availability impact. The integrity-focused impact aligns with registry hijacking-the attacker can modify registry entries but cannot directly read sensitive data or crash the system. The requirement for local access (AV:L) and low-level user privileges (PR:L) significantly constrains real-world exploitation, as attackers must first gain local system access. The high complexity (AC:H) suggests the attack requires specific conditions or non-obvious exploitation steps. However, the vulnerability is context-dependent: only applications that pass untrusted input (e.g., from command-line arguments, external files, or network sources) to setAsDefaultProtocolClient() are at risk; hardcoded protocol names are safe. The straightforward nature of the validation bypass and the potential for protocol hijacking (a notable privilege escalation or lateral movement technique) elevate practical concern for vulnerable applications, even though the CVSS base score is moderate.

Exploit ScenarioDerived

An Electron-based application accepts a protocol name from a user-supplied configuration file or command-line argument and passes it directly to app.setAsDefaultProtocolClient(protocol). An attacker crafts a malicious protocol string such as 'test\..\protocolhandler' or uses registry path traversal syntax to cause the registry write to target a sibling subkey under HKCU\Software\Classes\ that belongs to a legitimate protocol handler (e.g., 'http' or 'mailto'). Upon the vulnerable application's next execution, the attacker's registry entry overwrites the legitimate handler, causing the hijacked protocol to launch the attacker's chosen executable instead of the original handler. No public exploit code has been identified at time of analysis, but the vulnerability is straightforward to exploit once untrusted input is identified in an application.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Apr 03, 2026

Electron's setAsDefaultProtocolClient() on Windows fails to validate protocol names before writing to the Windows registry, allowing local authenticated attackers to hijack protocol handlers by writing to arbitrary HKCU\Software\Classes\ subkeys when apps pass untrusted input as the protocol parameter. The vulnerability affects Electron versions prior to 38.8.6, 39.8.1, 40.8.1, and 41.0.0, and requires local access and low privileges; no public exploit has been identified at time of analysis.

RemediationAI

Vendor-released patches are available: Electron 38.8.6, 39.8.1, 40.8.1, and 41.0.0 contain the fix. Applications must update to the appropriate patched version for their major version branch. As an interim workaround, applications should validate protocol names against the regular expression /^[a-zA-Z][a-zA-Z0-9+.-]*$/ before passing them to app.setAsDefaultProtocolClient(); this ensures protocol names conform to RFC 3986 scheme syntax and prevents registry injection. Developers should also audit all callers of setAsDefaultProtocolClient() to identify whether untrusted input is being passed and apply the validation workaround immediately if such cases exist. For further guidance, contact security@electronjs.org or review https://github.com/electron/electron/security/advisories/GHSA-mwmh-mq4g-g6gr.

Affected Packages

npm electron fix: 38.8.6, 39.8.1, 40.8.1, 41.0.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in npm

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Electron is a framework for building cross-platform desktop applications using web technologies. On Windows, the setAsDefaultProtocolClient() API allows applications to register themselves as the default handler for custom protocol schemes (e.g., 'myapp://'). The vulnerability stems from insufficient input validation (CWE-20: Improper Input Validation) on the protocol name parameter before it is used to construct registry keys. Without validation, an attacker-controlled protocol name containing special characters or path traversal sequences can manipulate the registry write operation to target unintended subkeys under HKEY_CURRENT_USER\Software\Classes\, potentially overwriting legitimate protocol handler registrations. The affected CPE pkg:npm/electron indicates this affects the npm package across multiple major versions.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

NVD PRIMARY 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Red Hat 4.7 MEDIUM

Primary rating from NVD.

CVSS VectorNVD

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
None

Lifecycle Timeline

4
Severity Changed
Jul 24, 2026 - 22:23 NVD
MEDIUM HIGH
CVSS changed
Jul 24, 2026 - 22:23 NVD
4.7 (MEDIUM) 7.5 (HIGH)
Patch released
Apr 03, 2026 - 08:30 nvd
Patch available
CVE Published
Apr 03, 2026 - 02:41 nvd
MEDIUM 4.7

DescriptionNVD

Impact

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.

Workarounds

Validate the protocol name matches /^[a-zA-Z][a-zA-Z0-9+.-]*$/ before passing it to app.setAsDefaultProtocolClient().

Fixed Versions

  • 41.0.0
  • 40.8.1
  • 39.8.1
  • 38.8.6

For more information

If there are any questions or comments about this advisory, please email [security@electronjs.org](mailto:security@electronjs.org)

Threat Intelligence Overview

EPSS Score
0.0%
Top 92% exploitable
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High
NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

38
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +38
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

Affected Products (CPE)NVD

pkg:npm/electron
pkg:npm/electron
pkg:npm/electron
pkg:npm/electron

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy