CVE-2019-15599: Tree kill Command Injection Vulnerability
HIGHCVE-2019-15599 is a HIGH command injection vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Tree kill libraries in the npm ecosystem. The issue involves command injection in tree-kill. Remediation is available by upgrading affected packages to version 1.2.2.
CVE-2019-15599 at a Glance
How to Fix CVE-2019-15599
To remediate this vulnerability, upgrade all affected Tree kill 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 tree-kill@1.2.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls tree-kill
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2019-15599, inspect your project dependencies using npm:
npm ls tree-kill
Analyze the terminal output to locate any version of Tree kill in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.2.2), your application is affected.
Note: The npm ls tree-kill 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-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Tree kill, 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-2019-15599 Affected Tree kill Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
tree-kill
|
npm |
< 1.2.2
|
1.2.2
|
References
Frequently Asked Questions
What is CVE-2019-15599?
Which Tree kill versions are affected?
What version fixes CVE-2019-15599?
Is tree-kill affected?
What CWE is associated with CVE-2019-15599?
How can I check npm dependencies for CVE-2019-15599?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-884p-74jh-xrg2",
"modified" : "2023-11-08T20:05:23Z",
"published" : "2020-09-04T16:57:20Z",
"aliases" : [ "CVE-2019-15599" ],
"summary" : "Command Injection in tree-kill",
"details" : "Versions of `tree-kill` prior to 1.2.2 are vulnerable to Command Injection. The package fails to sanitize values passed to the `kill` function. If this value is user-controlled it may allow attackers to run arbitrary commands in the server. The issue only affects Windows systems.\n\n\n## Recommendation\n\nUpgrade to version 1.2.2 or later.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "tree-kill"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.2.2"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2019-15599"
}, {
"type" : "WEB",
"url" : "https://github.com/pkrumins/node-tree-kill/commit/deee138a8cbc918463d8af5ce8c2bec33c3fd164"
}, {
"type" : "WEB",
"url" : "https://hackerone.com/reports/701183"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/pkrumins/node-tree-kill"
}, {
"type" : "WEB",
"url" : "https://github.com/pkrumins/node-tree-kill/releases/tag/v1.2.2"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-94" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2020-08-31T18:59:05Z",
"nvd_published_at" : null
}
}