Skip to main content

CVE-2026-34769

HIGH
Improper Neutralization of Argument Delimiters in a Command ('Argument Injection') (CWE-88)
2026-04-03 https://github.com/electron/electron GHSA-9wfr-w7mm-pc7f
8.8
CVSS 3.1 · NVD
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Provide untrusted configuration object
  2. Delivery
    Spread object into webPreferences
  3. Exploit
    Inject commandLineSwitches parameter
  4. Execution
    Disable renderer sandbox
  5. Impact
    Execute arbitrary code in renderer process

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Argument sanitization
Exploitation Conditions

Electron application must construct webPreferences by spreading untrusted configuration objects without an allowlist. Attacker needs local access and victim interaction (e.g., opening crafted config file). Fixed hardcoded webPreferences are not affected.

Impact

Real-world risk is moderate despite the 7.8 CVSS score due to several limiting factors. Attack vector is local (AV:L) requiring the attacker to influence application configuration files or environment variables read at startup, and attack complexity is high (AC:H) because exploitation depends on specific insecure coding patterns where developers spread untrusted objects into webPreferences without allowlisting. User interaction (UI:R) is required as the victim must launch the vulnerable application with attacker-controlled configuration. No EPSS score provided, and no confirmed active exploitation (not in CISA KEV). The vulnerability affects a subset of Electron applications-only those dynamically constructing webPreferences from external sources without input validation. Well-architected Electron apps using hardcoded, static webPreferences objects remain unaffected. However, the scope change and potential for complete sandbox bypass (C:H/I:H/A:H) means successful exploitation grants attackers significant control, potentially enabling arbitrary code execution with the user's privileges. Priority should focus on applications known to load external configuration files or accept user-customizable settings that feed into BrowserWindow creation. The publicly available GitHub advisory provides technical details that could facilitate proof-of-concept development.

Exploit ScenarioDerived

An attacker identifies an Electron-based desktop application that loads user preferences from a JSON configuration file in the user's home directory and spreads that configuration into webPreferences during BrowserWindow creation. The attacker modifies the config file to inject {"commandLineSwitches": ["--no-sandbox", "--disable-web-security"]} and socially engineers the victim to restart the application. Upon launch, the Electron renderer process starts with sandboxing disabled and web security controls bypassed. The attacker then serves malicious content through a compromised website or man-in-the-middle attack, exploiting the disabled same-origin policy to access local files, execute arbitrary Node.js code if nodeIntegration becomes accessible, and potentially achieve persistent code execution with the user's privileges. Attack complexity is high because the attacker must both control the configuration source and convince the user to launch the application, but successful exploitation completely compromises the application's security boundary.

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

Command line injection in Electron via undocumented commandLineSwitches webPreference enables sandbox escape and security control bypass when applications spread untrusted configuration objects into webPreferences. Attackers can inject arbitrary command-line switches to disable renderer process sandboxing or web security protections, achieving local code execution with elevated privileges. CVSS 7.8 (High) with attack complexity HIGH requiring user interaction. No public exploit identified at time of analysis, though technical disclosure is public via GitHub advisory.

RemediationAI

Upgrade Electron to patched versions: 41.0.0-beta.8 or later for 41.x beta users, 40.7.0 or later for 40.x stable branch, 39.8.0 or later for 39.x branch, or 38.8.6 or later for 38.x branch. For applications unable to upgrade immediately, implement strict input validation by creating an explicit allowlist of permitted webPreferences keys when constructing BrowserWindow or webContents options from external configuration sources. Refactor code to avoid using JavaScript spread operators or Object.assign on untrusted configuration objects directly into webPreferences. Instead, use defensive copying that only includes known-safe preference keys. Review all code paths where webPreferences are constructed from user-controlled files (config files, environment variables, command-line arguments) and apply allowlist validation. Complete technical guidance available in the official advisory at https://github.com/electron/electron/security/advisories/GHSA-9wfr-w7mm-pc7f. For additional security questions, contact security@electronjs.org.

Affected Packages

npm electron fix: 38.8.6, 39.8.0, 40.7.0, 41.0.0-beta.8

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 (Chromium + Node.js). The vulnerability stems from CWE-88 (Improper Neutralization of Argument Delimiters in a Command) involving an undocumented commandLineSwitches webPreference option. When applications dynamically construct BrowserWindow or webContents options using JavaScript spread operators on untrusted input, attackers can inject arbitrary Chromium command-line switches into renderer processes. Critical switches like --disable-web-security, --no-sandbox, or --disable-site-isolation-trials can fundamentally undermine Electron's security model by breaking renderer process isolation, disabling same-origin policy enforcement, or compromising the sandbox that prevents renderer code from accessing system resources. Affected package is pkg:npm/electron across versions prior to the fixed releases. The scope change (S:C) in the CVSS vector indicates the vulnerability can affect resources beyond the vulnerable component's security scope, reflecting sandbox escape potential.

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 8.8 HIGH
AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Red Hat 7.7 HIGH

Primary rating from NVD.

CVSS VectorNVD

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

Lifecycle Timeline

3
CVSS changed
Jun 30, 2026 - 03:24 NVD
7.7 (HIGH) 8.8 (HIGH)
Patch released
Apr 03, 2026 - 08:30 nvd
Patch available
CVE Published
Apr 03, 2026 - 02:39 nvd
HIGH 7.7

DescriptionNVD

Impact

An undocumented commandLineSwitches webPreference allowed arbitrary switches to be appended to the renderer process command line. Apps that construct webPreferences by spreading untrusted configuration objects may inadvertently allow an attacker to inject switches that disable renderer sandboxing or web security controls.

Apps are only affected if they construct webPreferences from external or untrusted input without an allowlist. Apps that use a fixed, hardcoded webPreferences object are not affected.

Workarounds

Do not spread untrusted input into webPreferences. Use an explicit allowlist of permitted preference keys when constructing BrowserWindow or webContents options from external configuration.

Fixed Versions

  • 41.0.0-beta.8
  • 40.7.0
  • 39.8.0
  • 38.8.6

For more information

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

Executive ViewAI

Why It Matters

CVE-2026-34769 affects Electron-based applications that expose untrusted configuration to webPreferences, allowing attackers to inject command-line switches that disable sandbox protections and achieve local code execution with elevated privileges. Organizations running Electron applications (including Visual Studio Code, Discord, Slack desktop clients, and custom Electron apps) face risk of privilege escalation if users are tricked into loading malicious configurations. This requires immediate inventory and mitigation given the high severity and lack of vendor patch.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: (1) Disable or restrict users' ability to load external configuration files into Electron applications; (2) Implement strict code review processes for any custom Electron applications that accept configuration objects; (3) Deploy EDR/XDR tooling configured to alert on Electron process creation with commandLineSwitches modifications or sandbox-disabling flags (--no-sandbox, --disable-web-security); (4) Restrict local administrator privileges to reduce elevation-of-privilege impact; (5) Monitor vendor security advisories for Electron and dependent applications (Chromium, Node.js) for patch releases.

Threat Intelligence Overview

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

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
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

44
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
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