CVE-2017-1000219: Windows cpu Command Execution Vulnerability
CRITICALCVE-2017-1000219 is a CRITICAL (CVSS 9.8) command execution vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting Windows cpu libraries in the npm ecosystem. The issue involves command execution in windows-cpu. Remediation is available by upgrading affected packages to version 0.1.5.
CVE-2017-1000219 at a Glance
Security Impact
CVSS: 9.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2017-1000219
To remediate this vulnerability, upgrade all affected Windows cpu 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 windows-cpu@0.1.5
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls windows-cpu
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2017-1000219, inspect your project dependencies using npm:
npm ls windows-cpu
Analyze the terminal output to locate any version of Windows cpu in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.1.5), your application is affected.
Note: The npm ls windows-cpu 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 Windows cpu, 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-1000219 Affected Windows cpu Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
windows-cpu
|
npm |
< 0.1.5
|
0.1.5
|
References
Frequently Asked Questions
What is CVE-2017-1000219?
Which Windows cpu versions are affected?
What version fixes CVE-2017-1000219?
Is windows-cpu affected?
What is the CVSS score of CVE-2017-1000219?
What CWE is associated with CVE-2017-1000219?
How can I check npm dependencies for CVE-2017-1000219?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-63m4-fhf2-cmf7",
"modified" : "2023-09-08T18:52:10Z",
"published" : "2020-09-01T16:43:55Z",
"aliases" : [ "CVE-2017-1000219" ],
"summary" : "Command Execution in windows-cpu",
"details" : "Version of `windows-cpu` before 0.1.5 will execute arbitrary code passed into the first argument of the `findLoad` method, resulting in remote code execution.\n\n## Proof of Concept\n\n```js\nvar win = require('windows-cpu');\nwind.findLoad('foo & calc.exe');\n```\n\n\n## Recommendation\n\nUpdate to version 0.1.5 or later.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "windows-cpu"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.1.5"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-1000219"
}, {
"type" : "WEB",
"url" : "https://github.com/KyleRoss/windows-cpu/commit/b75e19aa2f7459a9506bceb577ba2341fe273117"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/KyleRoss/windows-cpu"
}, {
"type" : "WEB",
"url" : "https://github.com/KyleRoss/windows-cpu/blob/master/index.js#L81"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/336"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-78" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2020-08-31T18:19:44Z",
"nvd_published_at" : null
}
}