Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit deeply nested HTML/XML document
-
ExploitApplication calls compareDocumentPosition/uniqueSort on nodes
-
ExecutionQuadratic ancestor-chain construction consumes CPU
-
ImpactNode.js event loop blocked, service denied
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V2 - Validation and Business Logic Algorithmic complexity limits
|
| Exploitation Conditions | Exploitation requires that the application (1) parses attacker-controlled/untrusted HTML or XML and (2) calls domutils' compareDocumentPosition() or uniqueSort() on nodes of that document, and that the attacker can supply a document with deeply nested elements (the advisory demonstrates ~100,000 nested <b> tags, ~300 KB). The vulnerable code path exists in domutils >=1.5.0 and <=4.0.2 on Node.js. What limits exploitation: applications that never run compareDocumentPosition()/uniqueSort() on untrusted input are not affected, and the advisory's workaround - rejecting documents nested deeper than the application needs before comparing or sorting - prevents the quadratic blowup; the only complete fix is upgrading to 4.1.0. |
| Impact | This is a genuine but moderate-priority issue, not a critical one, and the signals are internally consistent. The only supplied CVSS vector is CVSS 4.0 (AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N, score 6.9), which correctly reflects a remote, unauthenticated, low-complexity attack whose sole impact is a low-grade availability hit (temporary event-loop blocking) with no confidentiality or integrity loss and no scope change. CWE-407 (algorithmic complexity / quadratic blowup) matches the described quadratic-time behavior in compareDocumentPosition(). The vuln.today decision label is 'this_month' (not act_now/emergency), aligning with a DoS-only impact. A working proof-of-concept is published in the GHSA advisory, which raises practical reproducibility, but there is NO CISA KEV listing and NO EPSS score provided, so there is no evidence of active, widespread exploitation - the risk is latent and depends entirely on whether a given application feeds untrusted documents into the affected functions. No signals conflict here; the main caveat is that EPSS is simply absent (not low), so exploitation probability cannot be quantified from the input. |
| Exploit ScenarioDerived | An attacker submits an HTML or XML document containing on the order of 100,000 deeply nested elements (roughly 300 KB) to a Node.js service that parses it and then calls domutils' compareDocumentPosition() or uniqueSort() on the resulting nodes. Each comparison runs in time quadratic to node depth (~1 second per comparison on domutils 4.0.2), stalling the single-threaded event loop and denying service to all other requests. A public proof-of-concept demonstrating this is included in the vendor GHSA advisory. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Dec 04, 2026
Denial of service in the npm package domutils (versions 1.5.0 through 4.0.2) allows an attacker who supplies deeply nested HTML or XML to block the Node.js event loop when an application calls compareDocumentPosition() or uniqueSort() on those nodes. The flaw is algorithmic rather than memory-safety related: building each node's ancestor chain with unshift() makes a single comparison take time quadratic in nesting depth, and the vendor advisory demonstrates roughly one second of blocking with about 100,000 nested <b> tags in a ~300 KB document against version 4.0.2. The CVSS:4.0 vector rates it 6.9 (AV:N/AC:L/PR:N/UI:N with only low availability impact, no confidentiality or integrity impact), matching an unauthenticated remote trigger, and a public proof-of-concept snippet is included in the vendor advisory; it is not verified as working exploit code, and there is no indication of active exploitation. Exploitation is conditional on the application both parsing untrusted markup and running these comparison or sorting helpers on it.
RemediationAI
Vendor-released patch: upgrade domutils to 4.1.0 or later, which builds ancestor chains in linear time (upstream commit 560a8d1886b8ac28872432b3bb368c19930a6c8f; release notes at https://github.com/fb55/domutils/releases/tag/v4.1.0). Where upgrading is not immediately possible, the vendor's stated workaround is to reject documents nested deeper than the application actually needs before comparing or sorting their nodes, which caps the depth fed into the quadratic code path; the trade-off is that legitimate deeply structured documents must be turned away or flattened, and the workaround depends on being able to measure depth prior to the comparison or sort. Applications that never pass untrusted markup to compareDocumentPosition() or uniqueSort() are outside the affected path, but note the advisory is explicit that only upgrading to 4.1.0 completely fixes the issue; since domutils is typically a transitive dependency, inventory parent packages and lockfiles for versions in the >=1.5.0 to <=4.0.2 range and pin the resolved version to 4.1.0 or newer.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
domutils is a low-level Node.js utility library used by the htmlparser2 ecosystem to work with DOM-like trees. The affected routine, compareDocumentPosition(), must determine the relative document order of two nodes, which requires materializing each node's chain of ancestors up to the root. The implementation built those chains with Array.prototype.unshift(), an O(n) operation per insertion, so producing a chain of depth d cost O(d^2) time; because uniqueSort() compares pairs of nodes and repeats this work for every comparison, the cost compounds across a full sort. This is CWE-407 (Inefficient Algorithmic Complexity): the input size that matters is nesting depth, not document byte size, so a few hundred kilobytes of nested tags is enough to occupy the single Node.js event loop thread for a measurable interval and stall other requests. The upstream fix (commit 560a8d1886b8ac28872432b3bb368c19930a6c8f, released as 4.1.0) replaces unshift() with push() and rewrites the comparison to walk both chains from the root end, making chain construction linear and the overall comparison linear in depth; a regression test covers ordering of siblings beneath a 2000-deep ancestor chain. The trigger path requires the consuming application to parse attacker-controlled HTML/XML and then call compareDocumentPosition() or uniqueSort() on the resulting nodes.
Know when Domutils gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
Remote unauthenticated attacker supplies a crafted document (AV:N/AC:L/PR:N/UI:N); impact is limited to temporary event-loop blocking, so A:L and C:N/I:N.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
domutils 1.5.0 before 4.1.0 contains a denial of service vulnerability in compareDocumentPosition() that takes quadratic time when building ancestor chains with unshift(). Attackers can supply HTML or XML documents with deeply nested elements that applications compare or sort via uniqueSort() to block the Node.js event loop.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
Memory exhaustion in the domutils npm package (versions 2.8.0 through 4.0.2) allows remote attackers to terminate Node.j
Improper input handling in the npm package domutils (versions 1.3.0 through 4.0.2) lets remote attackers exhaust CPU and
Deeply nested HTML or XML documents can overflow the JavaScript call stack inside domutils' findOne(), existsOne() and g
Stack exhaustion in the npm package domutils (versions 1.1.0 through 4.0.2) lets unauthenticated remote attackers crash
Quadratic-time denial of service in the npm package domutils 3.1.0 through 4.0.2 lets remote attackers block the Node.js
EUVD-2026-144269
NVD
CVE.org
GitHub
VulDB
Exploit-DB