Improper Control of Generation of Code ('Code Injection') Affecting node package, versions [,18.20.2) [20.0.0, 20.12.2) [21.0.0, 21.7.3)


0.0
high
0
10

Snyk CVSS

    Attack Complexity Low
    Scope Changed

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-UPSTREAM-NODE-6615824
  • published 16 Apr 2024
  • disclosed 9 Apr 2024
  • credit ryotak

How to fix?

Upgrade node to version 18.20.2, 20.12.2, 21.7.3 or higher.

Overview

node is a JavaScript runtime built on Chrome's V8 JavaScript engine.

Affected versions of this package are vulnerable to Improper Control of Generation of Code ('Code Injection') due to the improper handling of batch files in child_process.spawn or child_process.spawnSync. An attacker can inject arbitrary commands and achieve code execution even if the shell option is not enabled.

Note: This vulnerability only affects Windows machines.

References