CVE-2019-15599: Tree kill Command Injection Vulnerability

HIGH
Advisory Identifier: GHSA-884p-74jh-xrg2
CWE-94
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2019-15599
GHSA Identifier GHSA-884p-74jh-xrg2
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-94: Improper Control of Generation of Code ('Code Injection')
Affected Product Tree kill
Package Ecosystem npm
Published Date
Last Updated

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.

tree-kill fixed: 1.2.2
npm install tree-kill@1.2.2
Verify Direct and Transitive Dependencies

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

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. ## Recommendation Upgrade to version 1.2.2 or later.

CVE-2019-15599 Affected Tree kill Versions

1 component(s)
Fixed Versions:
1.2.2
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?
CVE-2019-15599 is a security vulnerability in Tree kill involving Command Injection in tree-kill under CWE-94: Improper Control of Generation of Code ('Code Injection').
Which Tree kill versions are affected?
Affected versions include releases prior to 1.2.2 across affected packages: tree-kill.
What version fixes CVE-2019-15599?
Upgrading to 1.2.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is tree-kill affected?
Yes, tree-kill is affected in releases prior to 1.2.2. Upgrade your dependency to 1.2.2 or later.
What CWE is associated with CVE-2019-15599?
CVE-2019-15599 is classified under CWE-94: Improper Control of Generation of Code ('Code Injection') (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.).
How can I check npm dependencies for CVE-2019-15599?
Run the dependency tree command: 'npm ls tree-kill'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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
  }
}