GHSA-Q69G-4HCV-6JG4
Vulnerability from github – Published: 2026-09-17 14:50 – Updated: 2026-09-17 14:50Summary
A Windows-specific command injection vulnerability exists in @cyclonedx/cyclonedx-npm when the CLI is invoked with the --workspace <value> option.
User-supplied --workspace values can be passed to a shell command without proper neutralization on the Windows fallback execution path, enabling attackers to inject arbitrary OS commands.
The vulnerability was fixed in version [6.0.0][v6.0.0].
Vulnerability Details
When cyclonedx-npm is executed with the --workspace option, the provided argument is incorporated into an internal command execution flow.
On Windows systems, this path can interpret untrusted --workspace input as shell syntax if not safely handled.
As a result, specially crafted workspace names can break out of the intended command context and execute arbitrary commands with the privileges of the invoking user.
Impact
An attacker who can influence the value passed to --workspace can execute arbitrary OS commands on Windows hosts.
This may lead to:
- Arbitrary command execution
- Data exfiltration
- Local privilege escalation (depending on runtime context and privileges)
- Modification or destruction of files accessible to the user running the CLI
The vulnerability affects only scenarios where:
- The user invokes
cyclonedx-npmwith--workspace <value>, and - The vulnerable execution path is reached on Windows.
Exploitation Conditions (High-Level)
Exploitation requires the attacker to supply or influence the --workspace value passed to the CLI.
If the tool falls back to the vulnerable shell execution path on Windows, specially crafted workspace identifiers can cause unintended command execution.
No exploit code is included here to avoid providing weaponizable examples.
Root Cause
The CLI fallback execution path on Windows constructed a shell command using untrusted input from the --workspace option.
Because the fallback code path does not sanitize or escape the workspace value, special shell metacharacters (e.g., >, &, |) are interpreted by the shell, enabling command injection.
Fix
The vulnerability was resolved in [PR #1489], which ensures workspace values are handled safely and are no longer passed to a vulnerable shell execution path.
The fix is included in @cyclonedx/cyclonedx-npm version [6.0.0][v6.0.0].
Remediation
- Upgrade to version [6.0.0][v6.0.0] or later, which contains the complete fix.
- As a temporary mitigation for older versions, ensure that the environment variable
npm_execpathis set to anpm-cli.jsbefore invoking the tool. - Avoid passing untrusted or user-controlled values to the
--workspaceoption. - If immediate upgrade is not possible, prioritize mitigation on Windows systems, where exploitability exists.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "@cyclonedx/cyclonedx-npm"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "6.0.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-71538"
],
"database_specific": {
"cwe_ids": [
"CWE-78"
],
"github_reviewed": true,
"github_reviewed_at": "2026-09-17T14:50:40Z",
"nvd_published_at": null,
"severity": "HIGH"
},
"details": "## Summary\n\nA **Windows-specific** command injection vulnerability exists in `@cyclonedx/cyclonedx-npm` when the CLI is invoked with the `--workspace \u003cvalue\u003e` option. \nUser-supplied `--workspace` values can be passed to a shell command without proper neutralization on the Windows fallback execution path, enabling attackers to inject arbitrary OS commands. \n\nThe vulnerability was fixed in version [6.0.0][v6.0.0].\n\n## Vulnerability Details\n\nWhen `cyclonedx-npm` is executed with the `--workspace` option, the provided argument is incorporated into an internal command execution flow. \nOn **Windows systems**, this path can interpret untrusted `--workspace` input as shell syntax if not safely handled.\n\nAs a result, specially crafted workspace names can break out of the intended command context and execute arbitrary commands with the privileges of the invoking user.\n\n## Impact\n\nAn attacker who can influence the value passed to `--workspace` can execute arbitrary OS commands **on Windows hosts**. \nThis may lead to:\n\n* Arbitrary command execution\n* Data exfiltration\n* Local privilege escalation (depending on runtime context and privileges)\n* Modification or destruction of files accessible to the user running the CLI\n\nThe vulnerability affects only scenarios where:\n\n* The user invokes `cyclonedx-npm` with `--workspace \u003cvalue\u003e`, and\n* The vulnerable execution path is reached on **Windows**.\n\n## Exploitation Conditions (High-Level)\n\nExploitation requires the attacker to supply or influence the `--workspace` value passed to the CLI. \nIf the tool falls back to the vulnerable shell execution path on **Windows**, specially crafted workspace identifiers can cause unintended command execution. \nNo exploit code is included here to avoid providing weaponizable examples.\n\n## Root Cause\n\nThe CLI fallback execution path on **Windows** constructed a shell command using untrusted input from the `--workspace` option. \nBecause the fallback code path does not sanitize or escape the workspace value, special shell metacharacters (e.g., `\u003e`, `\u0026`, `|`) are interpreted by the shell, enabling command injection.\n\n## Fix\n\nThe vulnerability was resolved in [PR #1489], which ensures workspace values are handled safely and are no longer passed to a vulnerable shell execution path.\n\nThe fix is included in `@cyclonedx/cyclonedx-npm` version [6.0.0][v6.0.0].\n\n## Remediation\n\n* Upgrade to version [6.0.0][v6.0.0] or later, which contains the complete fix.\n* As a temporary mitigation for older versions, ensure that the environment variable `npm_execpath` is set to a `npm-cli.js` before invoking the tool.\n* Avoid passing untrusted or user-controlled values to the `--workspace` option.\n* If immediate upgrade is not possible, prioritize mitigation on **Windows systems**, where exploitability exists.",
"id": "GHSA-q69g-4hcv-6jg4",
"modified": "2026-09-17T14:50:40Z",
"published": "2026-09-17T14:50:40Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/CycloneDX/cyclonedx-node-npm/security/advisories/GHSA-q69g-4hcv-6jg4"
},
{
"type": "WEB",
"url": "https://github.com/CycloneDX/cyclonedx-node-npm/pull/1489"
},
{
"type": "WEB",
"url": "https://github.com/CycloneDX/cyclonedx-node-npm/commit/15d3beb5bcd2b0b6eccfdf31192f5103b3f12c0f"
},
{
"type": "PACKAGE",
"url": "https://github.com/CycloneDX/cyclonedx-node-npm"
},
{
"type": "WEB",
"url": "https://github.com/CycloneDX/cyclonedx-node-npm/releases/tag/v6.0.0"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "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",
"type": "CVSS_V4"
}
],
"summary": "@cyclonedx/cyclonedx-npm: Shell Injection via Unsanitized --workspace Argument on Windows"
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.