Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAttacker influences --workspace value
-
DeliveryVictim runs cyclonedx-npm on Windows
-
Exploitnpm_execpath absent, fallback shell path taken
-
ExecutionShell metacharacters injected into command
-
ImpactArbitrary OS commands execute as invoking user
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization OS command sanitization, avoid shell exec
MITRE ATT&CK
2 techniques across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires ALL of: (1) the target host is Windows; (2) cyclonedx-npm is invoked with the --workspace option and its value is attacker-controlled or attacker-influenced; and (3) the vulnerable Windows fallback npm-execution path in src/npmRunner.ts is reached, which only happens when the npm_execpath environment variable does NOT already point to the npm CLI. Limiting factors: not exploitable on Linux/macOS; requires a user or automation to actually run the CLI (UI:P), so it is realistic mainly in CI/CD or scripted pipelines that feed untrusted data into --workspace; execution is confined to the privileges of the invoking user. Versions <6.0.0 are affected; 6.0.0 reworks npm detection and removes the shell path. |
| Impact | This is a genuine but tightly-gated command-injection flaw (CWE-78) rather than a mass-exploitation threat. The vendor CVSS 4.0 vector (AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H = 8.5) is internally consistent with the description: exploitation is LOCAL (AV:L), needs no privileges (PR:N), but does require passive user interaction (UI:P) - namely a victim running the cyclonedx-npm CLI. The high VC/VI/VA rating is justified because successful injection yields arbitrary OS command execution as the invoking user. However, several signals push real-world priority down: exploitation is Windows-only, requires the npm_execpath fallback path to be reached (npm_execpath NOT already providing the CLI path), and requires the attacker to control or influence the --workspace argument. There is NO EPSS score, NO CISA KEV listing, and NO public exploit - the GHSA advisory explicitly withholds a weaponizable PoC. Exploitation status: no public exploit identified at time of analysis. Net: a legitimately high-CVSS issue whose practical risk is concentrated in CI/CD or automation contexts on Windows where a --workspace value can be derived from untrusted input; for most default interactive uses it is a lower-urgency patch-when-convenient item. |
| Exploit ScenarioDerived | On a Windows CI runner, a pipeline generates an SBOM by invoking cyclonedx-npm with a --workspace value taken from untrusted input (e.g. a branch/workspace name from an attacker-authored repository or PR). Because npm_execpath does not resolve the CLI, the Windows fallback path builds a shell command string that includes the raw workspace value, so metacharacters like |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 17, 2026
Command injection in the @cyclonedx/cyclonedx-npm CLI (versions before 6.0.0) lets an attacker who controls the value passed to the --workspace option run arbitrary operating-system commands on Windows hosts, with the privileges of the user invoking the tool. Exploitation is narrowly gated: the host must be Windows, the CLI must be invoked with --workspace, and the vulnerable Windows fallback npm-execution path in src/npmRunner.ts must be reached, which only occurs when the npm_execpath environment variable does not already point at the npm CLI. The assessed vector (CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H) shows local attack, no privileges required, but user interaction is needed, so the realistic scenario is a CI/CD or scripted pipeline that feeds untrusted data into --workspace; no public exploit code or confirmed active exploitation was identified at time of analysis, and the flaw is fixed in version 6.0.0.
RemediationAI
Vendor-released patch: upgrade @cyclonedx/cyclonedx-npm to 6.0.0 or later, which removes the unsafe shell path and reworks npm detection (see https://github.com/CycloneDX/cyclonedx-node-npm/releases/tag/v6.0.0, PR #1489 at https://github.com/CycloneDX/cyclonedx-node-npm/pull/1489, and commit https://github.com/CycloneDX/cyclonedx-node-npm/commit/15d3beb5bcd2b0b6eccfdf31192f5103b3f12c0f). Treat 6.0.0 as a breaking-change upgrade: npm detection and handling were reworked, so pipelines that relied on the old fallback behavior (or on npx-style wrapped invocation) should be re-tested, and npm must be resolvable on the host. If an immediate upgrade is not possible on Windows hosts, the most effective compensating control is to ensure the npm_execpath environment variable is already set to a valid path to the npm CLI before invoking the tool, which bypasses the vulnerable fallback branch entirely; the trade-off is that a stale or incorrect npm_execpath now causes an explicit error rather than a silent fallback, so environment setup must be verified. Additionally, never pass externally influenced strings into --workspace: validate or allow-list workspace names against known project workspaces and prefer static pipeline inputs, since CI jobs that interpolate untrusted refs, branch names, or issue metadata into --workspace are the realistic exploitation vector; this restriction costs flexibility for dynamic pipelines but removes the injection source. On Linux/macOS runners the flaw is not reachable, so scheduling untrusted SBOM generation on non-Windows agents is a viable containment step, at the cost of losing Windows-specific dependency resolution fidelity. There is no vendor workaround beyond these controls other than upgrading to 6.0.0.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in npm, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The root cause is CWE-78 (Improper Neutralization of Special Elements used in an OS Command, i.e. command injection). In src/npmRunner.ts, the tool must locate an npm executable to run npm ls for SBOM generation. The primary lookup uses the npm_execpath environment variable; when that variable is empty or unusable, a Windows fallback resolved the system npm via a shell command path that interpolated the untrusted --workspace value directly into a shell string instead of passing it as an argument vector. Shell metacharacters such as &, | and > in the workspace name are therefore interpreted by cmd.exe, allowing the attacker to break out of the intended command context and execute arbitrary commands. The upstream fix (PR #1489, commit 15d3beb5bcd2b0b6eccfdf31192f5103b3f12c0f) reworks npm detection: it uses argument-vector based execution (execFileSync) rather than shell string construction, validates that npm_execpath exists when set, and resolves the system npm by writing a temporary package.json with an npm run --silent npm_execpath script executed with a controlled cwd and stdio, avoiding shell interpolation of the workspace value entirely. The CPE entry cpe:2.3:a:cyclonedx:cyclonedx-node-npm:*:*:*:*:*:*:*:* flags the package broadly, but the vulnerable range is concretely npm < 6.0.0 on Windows; Linux and macOS are not affected because the vulnerable fallback is Windows-specific. Note that the provided CVSS:4.0 vector (AV:L/AC:L/AT:N/PR:N/UI:P) and the independent assessment's CVSS:3.1 vector agree that no privileges are required (PR:N) but interaction/participation is required (UI:P / UI:R), and that impact is confined to the local system (SC:N/SI:N/SA:N), i.e. execution is limited to the privileges of the invoking user.
Know when Windows gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Local CLI-argument vector (AV:L) needing a victim to run the tool (UI:R) with no auth (PR:N); command injection yields full C/I/A impact within the user's scope (S:U).
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
@cyclonedx/cyclonedx-npm creates CycloneDX Software Bill of Materials from npm projects. Prior to version 6.0.0, the Windows fallback path in src/npmRunner.ts, used when npm_execpath does not provide the npm CLI path, can construct a shell command containing an untrusted value from the --workspace option. When an attacker can influence that option and the fallback npm execution path is reached, shell metacharacters in the workspace value can execute arbitrary operating-system commands with the privileges of the user running the CLI, allowing data access, file modification, or service disruption. This issue is fixed in version 6.0.0.
Articles & Coverage 1
Technical POC Analysis
CWE-78 (Improper Neutralization of Special Elements used in an OS Command).
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
@cyclonedx/cyclonedx-npm, the CycloneDX software bill-of-materials generator embedded in many build pipelines, contains a command-injection flaw that allows untrusted input supplied to its --workspace option to execute arbitrary commands on Windows build hosts, running with the privileges of the account invoking the tool. Because this utility typically executes inside CI/CD with access to source code, registry tokens, and release artifacts, a successful attack could undermine the integrity of both the software you ship and the SBOM records your customers and regulators depend on. The flaw is unauthenticated but requires user interaction and is gated to Windows hosts reaching a specific npm-execution fallback path; no public exploit identified at time of analysis.
Apply vendor patch (upgrade to @cyclonedx/cyclonedx-npm 6.0.0). Interim mitigations where upgrade is pending: ensure npm_execpath points at the npm CLI to avoid the vulnerable Windows fallback path, never pass untrusted or user-supplied values to --workspace (hardcode or allowlist), restrict build agents to least privilege, and rotate credentials held by Windows runners that processed untrusted workspace values.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
OS command injection occurs when an application passes unsanitized user input directly into system shell commands.
Unauthenticated remote code execution in SmarterTools SmarterMail lets an attacker upload arbitrary files to any locatio
Windows Win32k fails to properly handle objects in memory, allowing local privilege escalation exploited in the wild in
A privilege escalation vulnerability (CVSS 5.5). Risk factors: actively exploited (KEV-listed), EPSS 94% exploitation pr
Windows Internet Shortcut Files (.url) contain an external control vulnerability (CVE-2025-33053, CVSS 8.8) that enables
Windows SMB contains an improper access control vulnerability (CVE-2025-33073, CVSS 8.8) enabling authenticated attacker
An unrestricted file upload vulnerability exists in MiniWeb HTTP Server <= Build 300 that allows unauthenticated remote
Serviio Media Server versions 1.4 through 1.8 on Windows contain an unauthenticated command injection in the /rest/actio
Mako Server versions 2.5 and 2.6 contain an unauthenticated OS command injection via the tutorial interface at examples/
Command injection in the Windows Shell lets remote, unauthenticated attackers bypass a Windows security feature and then
External control of file name or path in Windows NTLM allows an unauthorized attacker to perform spoofing over a network
Siemens Software Center (all versions) loads dynamic-link libraries from an uncontrolled search path, allowing an authen
Windows CLFS Driver contains an input validation flaw enabling local privilege escalation, yet another CLFS kernel vulne
EUVD-2026-81665
GHSA-q69g-4hcv-6jg4
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB