Junglewise Threat Intelligence

CVE-2019-15598: tree-kill OS command injection

CVE-2019-15598 · Severity: low · CVSS 3.1 · Published 2022-05-24

Technologies: tree-kill (npm). Vendors: npm.

Executive brief

tree-kill is a Node.js utility library used to terminate processes and their child processes. The library fails to properly sanitize user-controlled input when constructing shell commands on Windows, allowing attackers to inject arbitrary OS commands and achieve remote code execution if an application passes untrusted data to the kill function.

Technical details

tree-kill contains an OS command injection vulnerability (CWE-78) in its process killing logic on Windows systems. The vulnerability exists because the library constructs shell commands by directly concatenating user-supplied process IDs without proper escaping or validation. An attacker who can control the input to the kill() function can inject shell metacharacters (such as & and >) to execute arbitrary commands with the privileges of the Node.js process. The attack requires no authentication and no user interaction—only the ability to pass malicious input to the vulnerable function. The vulnerability was fixed in version 1.2.2.

Affected products

  • npm tree-kill before 1.2.2

Timeline

  • 2019-12-08: disclosed
  • 2022-05-24: advisory
  • 2019-12-18: patched: Fix released in version 1.2.2

References

Related threats