CVE-2026-34769
HIGHAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessProvide untrusted configuration object
-
DeliverySpread object into webPreferences
-
ExploitInject commandLineSwitches parameter
-
ExecutionDisable renderer sandbox
-
ImpactExecute 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
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
AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Primary rating from NVD.
CVSS VectorNVD
Lifecycle Timeline
3DescriptionNVD
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.840.7.039.8.038.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
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.
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
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
GHSA-9wfr-w7mm-pc7f
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB