CVE-2024-50611: CycloneDX cdxgen code execution in build files

CVE-2024-50611 · Severity: low · CVSS 3.1 · Published 2024-10-28

CycloneDX cdxgen is a tool that generates software component documentation for supply chain security analysis, commonly used in OWASP dependency scanning. When analyzing untrusted codebases, the tool executes code from build configuration files (such as build.gradle.kts), allowing an attacker to run arbitrary code with the privileges of the user running cdxgen.

Technologies: CycloneDX Cdxgen, @cyclonedx/cdxgen (npm). Vendors: CycloneDX, npm.

Quick answers

Is CVE-2024-50611 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2024-50611 being exploited in the wild.
How severe is CVE-2024-50611?
Low severity, with a CVSS score of 3.1, published 28 October 2024.
Which products and versions are affected?
CycloneDX Cdxgen < 11.1.7; @cyclonedx/cdxgen (npm) SEMVER:introduced=0,fixed=11.1.7.
Is there a fix for CVE-2024-50611?
Yes. @cyclonedx/cdxgen (npm): upgrade to 11.1.7 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2024-50611 attacked?
It is attacked with local access, in a software library.
Am I affected by CVE-2024-50611?
Check whether you run CycloneDX Cdxgen or @cyclonedx/cdxgen (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • @cyclonedx/cdxgen (npm): upgrade to 11.1.7 or later
    npm install @cyclonedx/cdxgen@11.1.7

Technical details

CycloneDX cdxgen versions prior to 11.1.7 are vulnerable to arbitrary code execution via Improper Control of Dynamically-Managed Code Resources (CWE-94). The root cause is that the tool executes code from build-related files (e.g., build.gradle.kts) when analyzing a codebase, a design limitation rather than an implementation error. The attack vector is local and requires a high-privilege user or high user interaction level. An attacker can craft a malicious build file in an untrusted repository that, when processed by cdxgen, executes arbitrary code with the privileges of the scanning process. The fix is available in version 11.1.7 and later.

Affected products

  • CycloneDX cdxgen < 11.1.7

Identifiers

  • CVE-2024-50611
  • GHSA-hxf3-vgpm-fv9p

Timeline

  • 2024-10-28: disclosed
  • 2024-10-28: patched: Version 11.1.7 released

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.