CVE-2026-41673: xmldom: Uncontrolled recursion in XML serialization leads to DoS
(updated )
Seven recursive traversals in lib/dom.js operate without a depth limit. A sufficiently deeply
nested DOM tree causes a RangeError: Maximum call stack size exceeded, crashing the application.
Reported operations:
Node.prototype.normalize()— reported by @praveen-kv (email 2026-04-05) and @KarimTantawey (GHSA-fwmp-8wwc-qhv6, viaDOMParser.parseFromString())XMLSerializer.serializeToString()— reported by @Jvr2022 (GHSA-2v35-w6hq-6mfw) and @KarimTantawey (GHSA-j2hf-fqwf-rrjf)
Additionally, discovered in research:
Element.getElementsByTagName()/getElementsByTagNameNS()/getElementsByClassName()/getElementById()Node.cloneNode(true)Document.importNode(node, true)node.textContent(getter)Node.isEqualNode(other)
All seven share the same root cause: pure-JavaScript recursive tree traversal with no depth guard. A single deeply nested document (parsed successfully) triggers any or all of these operations.
References
- github.com/advisories/GHSA-2v35-w6hq-6mfw
- github.com/xmldom/xmldom
- github.com/xmldom/xmldom/commit/17678a2a73ecbd1a2da90f3d47dc23da9cef81aa
- github.com/xmldom/xmldom/commit/291257493cb0eb6980eda83b162a9c4e6d7d2597
- github.com/xmldom/xmldom/commit/2d6d6916ed8a4c223db1f6d7560ab4544c465b0f
- github.com/xmldom/xmldom/commit/430357c7b6333108856e917bf2367afe5ceb6f8a
- github.com/xmldom/xmldom/commit/4845ef109221df0890825de2822fbe77afba3afe
- github.com/xmldom/xmldom/commit/8834218c85ac2a4d757b9587c9028e67c2f7b6c3
- github.com/xmldom/xmldom/commit/8b7cfd1491314abdc347261921d7334ff15f7112
- github.com/xmldom/xmldom/commit/b0620383abc1df067f3ce1014c43ae1bc1161eeb
- github.com/xmldom/xmldom/commit/e6edcab6bef5bcdba0b220bb35442aa72f452b84
- github.com/xmldom/xmldom/releases/tag/0.8.13
- github.com/xmldom/xmldom/releases/tag/0.9.10
- github.com/xmldom/xmldom/security/advisories/GHSA-2v35-w6hq-6mfw
- nvd.nist.gov/vuln/detail/CVE-2026-41673
Code Behaviors & Features
Detect and mitigate CVE-2026-41673 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →