CVE-2017-12581: Electron Electron Vulnerable To Remote Command Vulnerability
HIGHCVE-2017-12581 is a HIGH (CVSS 8.1) electron vulnerable to remote command vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting Electron libraries in the npm ecosystem. The issue involves electron vulnerable to remote command execution. Remediation is available by upgrading affected packages to version 1.6.8.
CVE-2017-12581 at a Glance
Security Impact
CVSS: 8.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2017-12581
To remediate this vulnerability, upgrade all affected Electron dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install electron@1.6.8
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls electron
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2017-12581, inspect your project dependencies using npm:
npm ls electron
Analyze the terminal output to locate any version of Electron in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.6.8), your application is affected.
Note: The npm ls electron command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. In Electron, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2017-12581 Affected Electron Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
electron
|
npm |
< 1.6.8
|
1.6.8
|
References
Frequently Asked Questions
What is CVE-2017-12581?
Which Electron versions are affected?
What version fixes CVE-2017-12581?
Is electron affected?
What is the CVSS score of CVE-2017-12581?
What CWE is associated with CVE-2017-12581?
How can I check npm dependencies for CVE-2017-12581?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-7fv9-m79r-j9x8",
"modified" : "2023-10-19T18:37:38Z",
"published" : "2022-05-17T02:14:12Z",
"aliases" : [ "CVE-2017-12581" ],
"summary" : "Electron vulnerable to remote command execution",
"details" : "Electron before 1.6.8 allows remote command execution because of a `nodeIntegration` bypass vulnerability. This also affects all applications that bundle Electron code equivalent to 1.6.8 or earlier. Bypassing the Same Origin Policy (SOP) is a precondition; however, recent Electron versions do not have strict SOP enforcement. Combining an SOP bypass with a privileged URL internally used by Electron, it was possible to execute native Node.js primitives in order to run OS commands on the user's host. Specifically, a `chrome-devtools://devtools/bundled/inspector.html` window could be used to eval a Node.js `child_process.execFile` API call.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "electron"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.6.8"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-12581"
}, {
"type" : "WEB",
"url" : "https://github.com/electron/electron/commit/05b6d91bf4c1e0ee65eeef70cd5d1bd1df125644"
}, {
"type" : "WEB",
"url" : "https://blog.doyensec.com/2017/08/03/electron-framework-security.html"
}, {
"type" : "WEB",
"url" : "https://doyensec.com/resources/us-17-Carettoni-Electronegativity-A-Study-Of-Electron-Security.pdf"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/electron/electron"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-78" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2023-10-19T18:37:38Z",
"nvd_published_at" : "2017-08-06T02:29:00Z"
}
}