GitHub Advisoryadvisory · npm

GHSA-38gf-rh2w-gmj7 @cyclonedx/cyclonedx-library Improper Restriction of XML External Entity Reference vulnerability

HIGH Published 2024-05-08 Modified 2024-05-14 Official page ↗
Aliases
CVE-2024-34345
Ecosystem
npm
Packages
@cyclonedx/cyclonedx-library
Severity
High
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Weaknesses
CWE-611
Reviewed
2024-05-08

Affected packages

• npm @cyclonedx/cyclonedx-library: >= 6.7.0, < 6.7.1 → fixed in 6.7.1

Description

Impact XML External entity injections could be possible, when running the provided XML Validator on arbitrary input. POC ```js const { Spec: { Version }, Validation: { XmlValidator } } = require('@cyclonedx/cyclonedx-library'); const version = Version.v1dot5; const validator = new XmlValidator(version); const input = ` ]> testing 1.337 &xxe; `; // 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/[email protected] `. Workarounds Do not run the provided XML validator on untrusted inputs. References • issue was introduced via .

Related

Alias · CVE (1)

  • CVE-2024-34345 The CycloneDX JavaScript library contains the core functionality of OWASP CycloneDX for JavaScript. vulnerability

Weakness · CWE (1)

  • CWE-611 Improper Restriction of XML External Entity Reference weakness

References