Improper Control of Generation of Code ('Code Injection') Affecting nodejs package, versions [,20.16.0)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.11% (31st percentile)

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 Learn

Learn about Improper Control of Generation of Code ('Code Injection') vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-CONAN-NODEJS-10669468
  • published9 Jul 2025
  • disclosed9 Apr 2024
  • creditryotak

Introduced: 9 Apr 2024

CVE-2024-27980  (opens in a new tab)
CWE-78  (opens in a new tab)

How to fix?

Upgrade nodejs to version 20.16.0 or higher.

Overview

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.

CVSS Base Scores

version 3.1