Arbitrary Code Injection Affecting @cyclonedx/cdxgen package, versions >=0.0.0
Threat Intelligence
Do your applications use this vulnerable package?
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applications- Snyk ID SNYK-JS-CYCLONEDXCDXGEN-8309366
- published 28 Oct 2024
- disclosed 27 Oct 2024
- credit Unknown
Introduced: 27 Oct 2024
New CVE-2024-50611 Open this link in a new tabHow to fix?
There is no fixed version for @cyclonedx/cdxgen
.
Overview
@cyclonedx/cdxgen is a Creates CycloneDX Software Bill of Materials (SBOM) from source or container image
Affected versions of this package are vulnerable to Arbitrary Code Injection when run against an untrusted codebase, allowing execution of code contained within build-related files such as build.gradle.kts
.
Note: This is a design limitation without an immediate fix.
Workaround
Run cdxgen using the container image with limited volume mounts, random TEMP directories (avoid
-v /tmp:/tmp
and-v $HOME:$HOME
), and a dedicated seccomp profiles.Use the argument
--no-install-deps
or--lifecycle pre-build
to prevent cdxgen from running install commands. This may not work for all package managers.Do not run cdxgen against untrusted codebases and with sudo/administrative privileges.
Use cdxgen with deno runtime.