High

Improper Restriction of XML External Entity Reference in org.cyclonedx:cyclonedx-core-java

  • Disclosed: 24.06.2024
  • Updated: 11.10.2026 13:20

Impact

Before deserializing CycloneDX Bill of Materials in XML format, cyclonedx-core-java leverages XPath expressions to determine the schema version of the BOM. The DocumentBuilderFactory used to evaluate XPath expressions was not configured securely, making the library vulnerable to XML External Entity (XXE) injection.

XXE injection can be exploited to exfiltrate local file content, or perform Server Side Request Forgery (SSRF) to access infrastructure adjacent to the vulnerable application.

PoC

java
import org.cyclonedx.parsers.XmlParser;

class Poc {

    public static void main(String[] args) {
        // Will throw org.cyclonedx.exception.ParseException: java.net.ConnectException: Connection refused
        new XmlParser().parse("""
            <?xml version="1.0" encoding="UTF-8"?>
            <!DOCTYPE bom [<!ENTITY % sp SYSTEM "https://localhost:1010/does-not-exist/file.dtd"> %sp;]>
            <bom xmlns="http://cyclonedx.org/schema/bom/1.5"/>
            """.getBytes());
    }

}

Patches

The vulnerability has been fixed in cyclonedx-core-java version 0.9.4.

Workarounds

If feasible, applications can reject XML documents before handing them to cyclonedx-core-java for parsing. This may be an option if incoming CycloneDX BOMs are known to be in JSON format.

References

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Java / Kotlin (Maven) org.cyclonedx:cyclonedx-core-java >= 2.1.0, < 9.0.4 9.0.4

References

CVSS score 7.5/10
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Weakness (CWE)
CWE-611
Platform
Java / Kotlin (Maven)
Package
org.cyclonedx:cyclonedx-core-java
Disclosed
24.06.2024
Updated
11.10.2026 13:20

Sources and licenses

OSV / GitHub Advisory Database - GHSA-683x-4444-jxh8 - CC BY 4.0

Vulnerability history: org.cyclonedx:cyclonedx-core-java

All published vulnerabilities of this package (Java / Kotlin (Maven)), newest first. Shows whether this is a one-off slip or a package that needs watching.

Total entries
2
First → latest
06.2024 11.2025
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • High 2

Disclosures per year

  1. 2024: 1
  2. 2025: 1
  3. 2026: 0
  1. Improper Restriction of XML External Entity Reference in org.cyclonedx:cyclonedx-core-java this entry
    High · 7.5 CVE-2024-38374 >= 2.1.0, < 9.0.4 9.0.4

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.