Описание
xmldom is a pure JavaScript W3C standard-based (XML DOM Level 2 Core) DOMParser and XMLSerializer module. From 0.9.0-beta.1 until 0.9.12, HTML-mode parsing through DOMParser.parseFromString() mishandles a mixed-case closing tag for the script, style, textarea, or title raw-text elements. parseHtmlSpecialContent, selected by isHTMLRawTextElement or isHTMLEscapableRawTextElement, uses a case-sensitive indexOf() and then calls substring() with a missing-close result of negative one, causing unstable parser progression and quadratic output amplification. A small untrusted text/html document can consequently consume disproportionate CPU and memory when parsed and serialized. This issue is fixed in @xmldom/xmldom version 0.9.12.
A flaw was found in xmldom, a JavaScript module used for parsing HTML documents. This vulnerability allows a remote attacker to craft a malicious HTML document with specific mixed-case closing tags. When processed, this document can cause the parser to consume excessive CPU and memory, leading to a denial of service for the application.
Отчет
A flaw was found in the xmldom JavaScript package. When parsing HTML documents containing specific mixed-case closing tags for raw-text elements (such as
Меры по смягчению последствий
Pre-sanitize untrusted HTML inputs to normalize raw-text element closing tags to lower case prior to passing them to DOMParser.parseFromString(), or restrict parsing to trusted XML/HTML sources.
Затронутые пакеты
| Платформа | Пакет | Состояние | Рекомендация | Релиз |
|---|---|---|---|---|
| Red Hat OpenShift Container Platform 4 | openshift4/ose-console | Affected |
Показывать по
Ссылки на источники
Дополнительная информация
Статус:
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.0-beta.1 until 0.9.12, HTML-mode parsing through DOMParser.parseFromString() mishandles a mixed-case closing tag for the script, style, textarea, or title raw-text elements. parseHtmlSpecialContent, selected by isHTMLRawTextElement or isHTMLEscapableRawTextElement, uses a case-sensitive indexOf() and then calls substring() with a missing-close result of negative one, causing unstable parser progression and quadratic output amplification. A small untrusted text/html document can consequently consume disproportionate CPU and memory when parsed and serialized. 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: HTML raw-text closing-tag case mismatch causes output amplification
Уязвимость метода DOMParser.parseFromString() модуля определения способа доступа к документам XML и управления ими XMLDOM, позволяющая нарушителю вызвать отказ в обслуживании
7.5 High
CVSS3