Xmldom
xmldom: HTML raw-text closing-tag case mismatch causes output amplification
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.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 0.9.0-beta.1, < 0.9.12
Fixed in 0.9.12
- >= 0.9.0-beta.1, < 0.9.12
Fixed in 0.9.12
Mitigation
Upgrade xmldom to 0.9.12 or later.
Upgrade xmldom to 0.9.12 or later.
References
- Vendor advisory github.com/xmldom/xmldom/security/advisories/G…
- Patch github.com/xmldom/xmldom/pull/1071
- Patch github.com/xmldom/xmldom/commit/7ced40c06c28d1…
1 more
- Release notes github.com/xmldom/xmldom/releases/tag/0.9.12
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.