CVE-2026-34769

Electron: Renderer command-line switch injection via undocumented commandLineSwitches webPreference

Published Apr 3, 2026 CVSS 3.1 · 7.8 High EPSS < 1% KEV · Not listed
Description
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, 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. This issue has been patched in versions 38.8.6, 39.8.0, 40.7.0, and 41.0.0-beta.8.

Analysis

AI-generated

Technical impact

Electron applications that build the webPreferences object from untrusted data can inject arbitrary command line switches into the renderer process. The injected switches can disable sandboxing or web security controls, allowing a malicious user to elevate privileges or execute code within the renderer context. This vulnerability aligns with CWE‑88 (Command Injection) and CWE‑912 (Unvalidated URL Parameters).

Affected Systems

Electron framework versions prior to 38.8.6, 39.8.0, 40.7.0 and 41.0.0‑beta.8 are affected when the webPreferences configuration is constructed from external or untrusted input. Applications that use fixed, hard‑coded webPreferences are not impacted. The issue exists across all alpha and beta builds up to 41.0.0‑beta.8 as listed in the CPE identifiers.

Risk and Exploitability

The CVSS score of 7.8 indicates high severity, and the EPSS <1% suggests low current exploit probability. No known exploitation is listed in KEV, but attackers who can supply or modify the configuration data can enable the vulnerability. Once the renderer sandbox is disabled, an attacker can execute arbitrary code with the renderer’s privileges, potentially leading to system compromise. The attack requires local or remote control over application configuration; when such control is present, the risk is significant.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Electron to version 38.8.6, 39.8.0, 40.7.0, 41.0.0‑beta.8 or later.
  • Validate and sanitize any external input used to build the webPreferences object, or implement an allowlist of permitted options.
  • If an upgrade is pending, explicitly clear or restrict the undocumented commandLineSwitches property when constructing webPreferences to prevent injection.

Generated by OpenCVE AI on April 9, 2026 at 17:32 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-9wfr-w7mm-pc7f Electron: Renderer command-line switch injection via undocumented commandLineSwitches webPreference
History
Type Values Removed Values Added
First Time appeared Electronjs
Electronjs electron
CPEs cpe:2.3:a:electronjs:electron:*:*:*:*:*:node.js:*:*
cpe:2.3:a:electronjs:electron:41.0.0:alpha1:*:*:*:node.js:*:*
cpe:2.3:a:electronjs:electron:41.0.0:alpha2:*:*:*:node.js:*:*
cpe:2.3:a:electronjs:electron:41.0.0:alpha3:*:*:*:node.js:*:*
cpe:2.3:a:electronjs:electron:41.0.0:alpha4:*:*:*:node.js:*:*
cpe:2.3:a:electronjs:electron:41.0.0:alpha5:*:*:*:node.js:*:*
cpe:2.3:a:electronjs:electron:41.0.0:alpha6:*:*:*:node.js:*:*
cpe:2.3:a:electronjs:electron:41.0.0:beta1:*:*:*:node.js:*:*
cpe:2.3:a:electronjs:electron:41.0.0:beta2:*:*:*:node.js:*:*
cpe:2.3:a:electronjs:electron:41.0.0:beta3:*:*:*:node.js:*:*
cpe:2.3:a:electronjs:electron:41.0.0:beta4:*:*:*:node.js:*:*
cpe:2.3:a:electronjs:electron:41.0.0:beta5:*:*:*:node.js:*:*
cpe:2.3:a:electronjs:electron:41.0.0:beta6:*:*:*:node.js:*:*
cpe:2.3:a:electronjs:electron:41.0.0:beta7:*:*:*:node.js:*:*
Vendors & Products Electronjs
Electronjs electron
Type Values Removed Values Added
First Time appeared Electron
Electron electron
Vendors & Products Electron
Electron electron
References
Metrics threat_severity

None

threat_severity

Important

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description 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, 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. This issue has been patched in versions 38.8.6, 39.8.0, 40.7.0, and 41.0.0-beta.8.
Title Electron: Renderer command-line switch injection via undocumented commandLineSwitches webPreference
Weaknesses CWE-88
CWE-912
References
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H'}

Weaknesses
  • CWE-88

    Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')

  • CWE-912

    Hidden Functionality

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jul 15, 2026, 1:03 AM
Reserved
Mar 30, 2026, 7:54 PM
Status
Modified
Published
Apr 4, 2026, 12:16 AM
Modified
Jul 24, 2026, 10:10 PM
Severity
Important
Public date
Apr 3, 2026, 11:33 PM