Описание
xmldom is a pure JavaScript W3C standard-based (XML DOM Level 2 Core) DOMParser and XMLSerializer module. From 0.9.10 until 0.9.12, the requireWellFormed: true serializer validates DocumentType.publicId and DocumentType.systemId with PubidLiteral_match and SystemLiteral_match expressions produced by reg() in lib/grammar.js, which inherit the multiline flag. A complete valid literal on the first line can therefore satisfy the matcher while U+000A, U+000D, U+2028, or U+2029 and breakout markup remain in the emitted declaration. This bypasses the strict-serialization mitigation for the earlier DocumentType injection advisory; creation and direct property assignment remain unvalidated by design. This issue is fixed in @xmldom/xmldom version 0.9.12.
A flaw was found in xmldom, a JavaScript XML parser and serializer module. A remote attacker could bypass the requireWellFormed strict-serialization mitigation for DocumentType injection by embedding line terminators within the publicId or systemId of a DocumentType declaration. This allows for the injection of arbitrary markup into the XML output, potentially leading to data manipulation or other security impacts depending on how the XML is processed.
Отчет
A flaw was found in the @xmldom/xmldom JavaScript package. The requireWellFormed serializer improperly validates DocumentType.publicId and DocumentType.systemId properties due to multiline regex flag inheritance in lib/grammar.js. A remote attacker can embed line terminators (U+000A, U+000D, U+2028, U+2029) and breakout markup within DocumentType declarations to bypass strict-serialization checks. This permits arbitrary markup injection into serialized XML output, compromising downstream document integrity without requiring user interaction.
Меры по смягчению последствий
Sanitize DocumentType.publicId and DocumentType.systemId inputs to strip all line terminators prior to serialization, or disable strict serialization features if untrusted DocumentType properties are processed.
Затронутые пакеты
| Платформа | Пакет | Состояние | Рекомендация | Релиз |
|---|---|---|---|---|
| Red Hat OpenShift Container Platform 4 | openshift4/ose-console | Affected |
Показывать по
Ссылки на источники
Дополнительная информация
Статус:
EPSS
7.5 High
CVSS3
Связанные уязвимости
(xmldom is a pure JavaScript W3C standard-based (XML DOM Level 2 Core) ...)
xmldom is a pure JavaScript W3C standard-based (XML DOM Level 2 Core) DOMParser and XMLSerializer module. From 0.9.10 until 0.9.12, the requireWellFormed: true serializer validates DocumentType.publicId and DocumentType.systemId with PubidLiteral_match and SystemLiteral_match expressions produced by reg() in lib/grammar.js, which inherit the multiline flag. A complete valid literal on the first line can therefore satisfy the matcher while U+000A, U+000D, U+2028, or U+2029 and breakout markup remain in the emitted <!DOCTYPE ...> declaration. This bypasses the strict-serialization mitigation for the earlier DocumentType injection advisory; creation and direct property assignment remain unvalidated by design. This issue is fixed in @xmldom/xmldom version 0.9.12.
xmldom is a pure JavaScript W3C standard-based (XML DOM Level 2 Core) ...
xmldom: requireWellFormed DocType publicId/systemId validation is bypassable via an embedded line terminator
Уязвимость сериализатора модуля определения способа доступа к документам XML и управления ими XMLDOM, позволяющая нарушителю оказать воздействие на целостность защищаемой информации
EPSS
7.5 High
CVSS3