Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. xmldom
  4. ›
  5. CVE-2026-41673

CVE-2026-41673: xmldom: Uncontrolled recursion in XML serialization leads to DoS

April 22, 2026 (updated May 8, 2026)

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, via DOMParser.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 →

Affected versions

All versions up to 0.6.0

Solution

Unfortunately, there is no solution available yet.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-674: Uncontrolled Recursion

Source file

npm/xmldom/CVE-2026-41673.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 09 May 2026 12:18:46 +0000.