CVE-2026-83613: xmldom: Quadratic-time attribute deduplication
xmldom builds the attribute collection of every parsed element by inserting attributes one at a
time into a DOM NamedNodeMap. Each insertion first performs a linear scan of all
already-inserted attributes to enforce the DOM uniqueness rule (no two attributes with the same
qualified name / namespace+local-name). Parsing an element that carries M distinct attributes
therefore costs 1 + 2 + … + M = O(M²) comparisons.
Because the trigger is simply “one element with many attributes”, the attack payload is a
fully well-formed XML document. No malformed markup, no error recovery, and no non-default
parser options are involved — parsing completes silently with zero warning/error/fatalError
events. An attacker who can submit a modest, highly compressible document (a single element with
tens of thousands of attributes, ~340 KB uncompressed) can consume seconds of single-threaded CPU
per request, enabling an unauthenticated denial of service.
This is distinct from the known quadratic-memory namespace-map issue: it burns CPU and it does not require any namespace declarations or nesting.
References
- github.com/advisories/GHSA-8344-3jmq-59r6
- github.com/xmldom/xmldom/commit/2c548f200cfec991cd5846627ef8f03542309213
- github.com/xmldom/xmldom/commit/cfb09b5dbeb035fdfedc9f01e2bbaf226bf47cf3
- github.com/xmldom/xmldom/pull/1071
- github.com/xmldom/xmldom/pull/1072
- github.com/xmldom/xmldom/releases/tag/0.8.15
- github.com/xmldom/xmldom/releases/tag/0.9.12
- github.com/xmldom/xmldom/security/advisories/GHSA-27p8-2357-5qqv
- github.com/xmldom/xmldom/security/advisories/GHSA-8344-3jmq-59r6
- nvd.nist.gov/vuln/detail/CVE-2026-83613
Code Behaviors & Features
Detect and mitigate CVE-2026-83613 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 →