Command Injection Affecting @cyclonedx/cyclonedx-npm package, versions >=2.1.0 <5.0.0


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.16% (6th 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 Command Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-CYCLONEDXCYCLONEDXNPM-17817903
  • published5 Jul 2026
  • disclosed19 Jun 2026
  • creditUnknown

Introduced: 19 Jun 2026

CVE-2026-55849  (opens in a new tab)
CWE-78  (opens in a new tab)

How to fix?

Upgrade @cyclonedx/cyclonedx-npm to version 5.0.0 or higher.

Overview

@cyclonedx/cyclonedx-npm is a Create CycloneDX Software Bill of Materials (SBOM) from NPM projects.

Affected versions of this package are vulnerable to Command Injection via the --workspace argument when the environment variable npm_execpath is unset or empty. An attacker can execute arbitrary operating system commands by supplying specially crafted input to the CLI. This is only exploitable if the tool is invoked with the --workspace option and the environment variable npm_execpath is unset or empty.

Workaround

This vulnerability can be mitigated by ensuring that the environment variable npm_execpath is set before invoking the tool.

CVSS Base Scores

version 4.0
version 3.1