CVE-2026-55849: CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in CycloneDX cyclonedx-node-npm
@cyclonedx/cyclonedx-npm creates CycloneDX Software Bill of Materials from npm projects. From 2.1.0 before 5.0.0, the CLI passes user-supplied --workspace values to a subshell without proper sanitization when npm_execpath is unset or empty, allowing arbitrary OS command execution with the privileges of the invoking user. This issue is fixed in version 5.0.0.
AI Analysis
Technical Summary
The cyclonedx-node-npm package, used to create CycloneDX Software Bill of Materials from npm projects, contains an OS command injection vulnerability (CWE-78) in versions >=2.1.0 and <5.0.0. The vulnerability arises because the CLI passes user-supplied --workspace parameters directly to a subshell without sanitization if the environment variable npm_execpath is unset or empty. This allows an attacker to execute arbitrary OS commands with the privileges of the user running the tool. The vulnerability is addressed in version 5.0.0.
Potential Impact
An attacker who can supply the --workspace parameter in the affected versions can execute arbitrary operating system commands with the privileges of the user invoking the cyclonedx-node-npm CLI, potentially leading to system compromise or unauthorized actions. There are no known exploits in the wild as of the published date.
Mitigation Recommendations
Upgrade to cyclonedx-node-npm version 5.0.0 or later, where this vulnerability is fixed. No other official remediation or temporary fixes are documented. Patch status is not explicitly stated but the fix is included in version 5.0.0.
CVE-2026-55849: CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in CycloneDX cyclonedx-node-npm
Description
@cyclonedx/cyclonedx-npm creates CycloneDX Software Bill of Materials from npm projects. From 2.1.0 before 5.0.0, the CLI passes user-supplied --workspace values to a subshell without proper sanitization when npm_execpath is unset or empty, allowing arbitrary OS command execution with the privileges of the invoking user. This issue is fixed in version 5.0.0.
CVSS v4.0
Score 8.5high
Affected software
pkg:npm/@cyclonedx/cyclonedx-npmRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The cyclonedx-node-npm package, used to create CycloneDX Software Bill of Materials from npm projects, contains an OS command injection vulnerability (CWE-78) in versions >=2.1.0 and <5.0.0. The vulnerability arises because the CLI passes user-supplied --workspace parameters directly to a subshell without sanitization if the environment variable npm_execpath is unset or empty. This allows an attacker to execute arbitrary OS commands with the privileges of the user running the tool. The vulnerability is addressed in version 5.0.0.
Potential Impact
An attacker who can supply the --workspace parameter in the affected versions can execute arbitrary operating system commands with the privileges of the user invoking the cyclonedx-node-npm CLI, potentially leading to system compromise or unauthorized actions. There are no known exploits in the wild as of the published date.
Mitigation Recommendations
Upgrade to cyclonedx-node-npm version 5.0.0 or later, where this vulnerability is fixed. No other official remediation or temporary fixes are documented. Patch status is not explicitly stated but the fix is included in version 5.0.0.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-06-17T16:44:40.994Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a4ec4a5c9d9e3dbe3c8d497
Added to database: 07/08/2026, 21:44:05 UTC
Last enriched: 07/16/2026, 09:59:13 UTC
Last updated: 08/19/2026, 22:52:13 UTC
Views: 81
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.