{"id":"CVE-2024-38374","aliases":["CVE-2024-38374","GHSA-683x-4444-jxh8"],"related":[],"kind":"vulnerability","state":"published","title":"Improper Restriction of XML External Entity Reference in org.cyclonedx:cyclonedx-core-java","summary":"The CycloneDX core module provides a model representation of the SBOM along with utilities to assist in creating, validating, and parsing SBOMs. 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. This vulnerability has been fixed in cyclonedx-core-java version 9.0.4.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"The CycloneDX core module provides a model representation of the SBOM along with utilities to assist in creating, validating, and parsing SBOMs. 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. This vulnerability has been fixed in cyclonedx-core-java version 9.0.4.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nBefore 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.\n\nXXE injection can be exploited to exfiltrate local file content, or perform Server Side Request Forgery (SSRF) to access infrastructure adjacent to the vulnerable application.\n\n### PoC\n\n```java\nimport org.cyclonedx.parsers.XmlParser;\n\nclass Poc {\n\n    public static void main(String[] args) {\n        // Will throw org.cyclonedx.exception.ParseException: java.net.ConnectException: Connection refused\n        new XmlParser().parse(\"\"\"\n            <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n            <!DOCTYPE bom [<!ENTITY % sp SYSTEM \"https://localhost:1010/does-not-exist/file.dtd\"> %sp;]>\n            <bom xmlns=\"http://cyclonedx.org/schema/bom/1.5\"/>\n            \"\"\".getBytes());\n    }\n\n}\n```\n\n### Patches\n\nThe vulnerability has been fixed in _cyclonedx-core-java_ version 0.9.4.\n\n### Workarounds\n\nIf feasible, applications can reject XML documents before handing them to _cyclonedx-core-java_ for parsing.\nThis may be an option if incoming CycloneDX BOMs are known to be in JSON format.\n\n### References\n\n* Issue was fixed via <https://github.com/CycloneDX/cyclonedx-core-java/pull/434>\n* Issue was introduced via <https://github.com/CycloneDX/cyclonedx-core-java/commit/162aa594f347b3f612fe0a45071693c3cd398ce9>\n* <https://owasp.org/www-community/vulnerabilities/XML_External_Entity_(XXE)_Processing>\n* <https://cheatsheetseries.owasp.org/cheatsheets/XML_External_Entity_Prevention_Cheat_Sheet.html#xpathexpression>","format":"markdown","source":"ghsa"},{"lang":"es","text":"El módulo principal de CycloneDX proporciona una representación modelo del SBOM junto con utilidades para ayudar a crear, validar y analizar SBOM. Antes de deserializar la lista de materiales de CycloneDX en formato XML, _cyclonedx-core-java_ aprovecha las expresiones XPath para determinar la versión del esquema de la lista de materiales. El `DocumentBuilderFactory` utilizado para evaluar expresiones XPath no estaba configurado de forma segura, lo que hacía que la biblioteca fuera vulnerable a la inyección de entidad externa XML (XXE). Esta vulnerabilidad se ha solucionado en cyclonedx-core-java versión 9.0.4.","source":"nvd"}],"published":"2024-06-24T20:44:48.000Z","modified":"2026-09-10T03:50:14.821Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"}],"cwes":["CWE-611"],"affected":[{"ranges":[{"version":">= 2.1.0, < 9.0.4","status":"affected"}],"vendor":"CycloneDX","product":"cyclonedx-core-java","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"2.1.0","fixed":"9.0.4","status":"affected"}],"vendor":"cyclonedx","product":"cyclonedx_core_java","cpe":"cpe:2.3:a:cyclonedx:cyclonedx_core_java:2.1.0:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"2.1.0","status":"affected","fixed":"9.0.4"}],"ecosystem":"Maven","package":"org.cyclonedx:cyclonedx-core-java","purl":"pkg:maven/org.cyclonedx/cyclonedx-core-java","source":"ghsa"}],"references":[{"url":"https://github.com/CycloneDX/cyclonedx-core-java/security/advisories/GHSA-683x-4444-jxh8","tags":["web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/CycloneDX/cyclonedx-core-java/pull/434","tags":["web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/CycloneDX/cyclonedx-core-java/pull/434/commits/ab0bc9c530d24f737970dbd0287d1190b129853d","tags":["web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-38374","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/CycloneDX/cyclonedx-core-java","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2024-07-01T18:05:26.661Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-38374","url":"https://www.cve.org/CVERecord?id=CVE-2024-38374","licence":"CVE Terms of Use","modified":"2024-08-02T04:04:25.277Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-683x-4444-jxh8","url":"https://github.com/advisories/GHSA-683x-4444-jxh8","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:14.821Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-38374","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-38374","licence":"Public domain","modified":"2026-06-17T07:40:01.093Z"}],"updatedAt":"2026-11-25T22:58:42.322Z","epss":{"score":0.00589,"percentile":0.49528,"date":"2026-12-01T12:00:22.000Z"}}