highVulnerability

CVE-2026-83613

## Summary 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. ## Details The DOM content handler adds each attribute of a starting element by calling `el.setAttributeNode(attr)` in a loop: ```js // DOMHandler.startElement for (var i = 0; i < len; i++) { var namespaceURI = attrs.getURI(i); var value = attrs.getValue(i); var qName = attrs.getQName(i); var attr = doc.createAttributeNS(namespaceURI, qName); attr.value = attr.nodeValue = value; el.setAttributeNode(attr); // O(existing attrs) each — see below } ``` https://github.com/xmldom/xmldom/blob/bb7a085dc5ba1eea3212388509b97bb4b4af32b9/lib/dom-parser.js#L370-L387 `setAttributeNode` delegates to `NamedNodeMap.setNamedItem`, which calls `getNamedItemNS` to look for an existing attribute with the same namespace URI and local name before appending: ```js setNamedItem: function (attr) { var el = attr.ownerElement; if (el && el !== this._ownerElem

Properties

ghsa_id
GHSA-8344-3jmq-59r6
summary
xmldom: Quadratic-time attribute deduplication
severity
high
epss_score
0.00344
cve_id
CVE-2026-83613
is_ghsa_only
false
ghsa_published
2026-09-08T21:01:31Z
source_url
https://github.com/advisories/GHSA-8344-3jmq-59r6
epss_percentile
0.27298
ghsa_updated
2026-09-08T21:01:33Z

Related Entities (7)

ENRICHED_BY (1)

[Source]FIRST EPSS

HAS_WEAKNESS (1)

[Weakness]Inefficient Algorithmic Complexity

REPORTED_BY (1)

[Source]GitHub Advisory Database

AFFECTS (2)

[Software]npm/xmldom
[Software]npm/@xmldom/xmldom

VULNERABLE_TO (2)

[Software]npm/@xmldom/xmldom
[Software]npm/xmldom

Explore deeper with Ninja Signal's threat intelligence graph

CVE-2026-83613 — Ninja Signal Threat Intelligence | Ninja Signal