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

Source: https://junglewise.ai/threats/cve-2019-15598-tree-kill-os-command-injection  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2022-05-24. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

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

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.

Technologies: [tree-kill (npm)](https://junglewise.ai/threats/technologies/tree-kill). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2019-15598 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2019-15598 being exploited in the wild.

**How severe is CVE-2019-15598?** Low severity, with a CVSS score of 3.1, published 24 May 2022.

**Which products and versions are affected?** tree-kill (npm) before 1.2.2.

**Is there a fix for CVE-2019-15598?** A patch was published on 2019-12-18: Fix released in version 1.2.2 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2019-15598 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2019-15598?** Check whether you run tree-kill (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

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

## Identifiers

- CVE-2019-15598
- GHSA-j7fq-p9q7-5wfv

## Timeline

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

## References

- [https://github.com/pkrumins/node-tree-kill/issues/30](https://github.com/pkrumins/node-tree-kill/issues/30)

## Related threats

- [tree-kill code injection on Windows](https://junglewise.ai/threats/tree-kill-code-injection-on-windows-83b0ec74)
- [tree-kill command injection on Windows](https://junglewise.ai/threats/cve-2019-15599-tree-kill-command-injection-on-windows)
