CycloneDX cyclonedx-node-npm
@cyclonedx/cyclonedx-npm: Shell Injection via Unsanitized --workspace Argument on Windows
@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.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- < 6.0.0
Fixed in 6.0.0
Mitigation
Upgrade cyclonedx-node-npm to 6.0.0 or later.
References
- Vendor advisory github.com/CycloneDX/cyclonedx-node-npm/securi…
- Patch github.com/CycloneDX/cyclonedx-node-npm/pull/1…
- Patch github.com/CycloneDX/cyclonedx-node-npm/commit…
1 more
- Release notes github.com/CycloneDX/cyclonedx-node-npm/releas…
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.