Skip to main content
VulnerabilityPublished

@cyclonedx/cdxgen: Maven project scanning may allow shell command injection through repository-controlled module paths

Affects @cyclonedx/cdxgenSource GCVE Database

0

CVSS 6.9 Medium : upgrade to 12.4.3 when convenient.

Data as of 22 Oct 2026, 17:35 UTC

CVSS 4.0 base score
6.9Medium
How severe the flaw is on the 0–10 CVSS scale.
Patch
Available – fixed in 12.4.3
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N

What to do

Upgrade @cyclonedx/cdxgen to 12.4.3.

Affected software

ProductAffectedFixed in
npm@cyclonedx/cdxgenAffected
  • <12.4.3
Fixed in
  • 12.4.3

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

A patch is available in cdxgen version 12.4.3 that fully addresses this vulnerability by removing unsafe shell execution and adding input hardening. Users should upgrade to version 12.4.3 or later. If immediate upgrade is not possible, mitigate risk by not running cdxgen server mode on untrusted networks, restricting access to the POST /sbom endpoint, avoiding scanning untrusted Maven repositories, running cdxgen in sandboxed or containerized environments, removing sensitive environment variables, applying least-privilege filesystem mounts, and restricting outbound network access. Use cdxgen secure or dry-run modes and configure host and command allowlists to reduce exposure. These mitigations reduce but do not fully eliminate risk in vulnerable versions.

Description

A command injection vulnerability exists in the Maven scanning flow of cdxgen versions prior to 12.4.3. The vulnerability arises because some Maven command invocations use shell execution with untrusted, repository-controlled paths, allowing shell metacharacters in directory names to be interpreted by the shell. This can enable an attacker controlling a scanned Maven project repository to execute arbitrary commands in the cdxgen process context. The issue affects both CLI and server modes and is fixed in version 12.4.3.

References

Community reviews

Loading reviews…