Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit crafted nested/wide HTML or XML
-
DeliveryReach css-select selectAll() or cheerio .find() over many nodes
-
ExploitTrigger quadratic removeSubsets() scan
-
ExecutionBlock Node.js event loop for seconds
-
ImpactDeny service to concurrent users
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V2 - Validation and Business Logic Algorithmic complexity limits
|
| Exploitation Conditions | Exploitation requires an application running domutils >= 1.3.0 and <= 4.0.2 (directly, or transitively via css-select's selectAll(query, nodes) called with an ARRAY of root nodes, or via cheerio's .find()) that processes attacker-controlled HTML or XML and passes many such nodes to removeSubsets(). The quadratic cost (O(n²·depth)) scales with node count and nesting depth - the advisory measures ~15 s for 5,000 nested elements plus 5,000 matching descendants (50 KB) and ~1.5 s for 40,000 siblings (280 KB). Limiting factors: single-root queries do not hit the hot path; impact is a temporary, recoverable event-loop stall rather than a crash; no confidentiality or integrity effect. Mitigation per the vendor is to limit the number of nodes and document depth passed to removeSubsets() (or skip the call when all nodes are distinct and none is an ancestor of another); the only complete fix is upgrading to domutils 4.1.0, and because cheerio 1.2.0 depends on domutils 3 (which has no fix and is incompatible with domutils 4), cheerio users must rely on the workarounds until a cheerio release adopts domutils 4.1.0. |
| Impact | This is a genuine but bounded availability risk - an algorithmic-complexity DoS (CWE-407), not an RCE or data-exposure flaw. The vendor CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N) scores 8.7 because the trigger is remote, low-complexity, and needs no authentication or user interaction, but every impact metric except availability is N (VA:H only), so the ceiling is denial of service, not compromise. The decisive limiter is NOT in the CVSS vector: the quadratic blow-up only occurs when MANY nodes are passed to removeSubsets(), which happens via css-select selectAll(query, nodes) called with an array of root nodes, or cheerio's .find(). A single-root query is not the hot path. No EPSS score is provided in the input and the issue is not on the CISA KEV list, so there is no evidence of active exploitation; the vuln.today decision label is 'this_week' (not act_now/emergency), consistent with a high-severity but non-actively-exploited library bug. Signals are mutually consistent (high CVSS from easy remote reach, moderate urgency from availability-only impact and no KEV); the main caveat is that the input 'Information Disclosure' tag directly contradicts the availability-only nature of the flaw and should be disregarded. Net: a real priority to patch for Node.js services that run cheerio/css-select over attacker-supplied HTML/XML, but it is a recoverable event-loop stall, not a critical breach. |
| Exploit ScenarioDerived | A Node.js service parses untrusted HTML or XML (e.g., scraping, sanitization, or templating) and runs a cheerio .find() or css-select selectAll() query across an array of context nodes. An attacker submits a ~50 KB document with ~5,000 deeply nested elements plus thousands of matching descendants; removeSubsets() then runs in O(n²·depth), blocking the Node.js event loop for roughly 15 seconds per request and denying service to all other clients. A runnable proof-of-concept is published in the GHSA advisory (GHSA-42h4-gpjh-8xhf). |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Dec 04, 2026
Improper input handling in the npm package domutils (versions 1.3.0 through 4.0.2) lets remote attackers exhaust CPU and block the Node.js event loop for seconds by supplying heavily nested or very wide HTML/XML documents whose nodes are passed to removeSubsets(). The hot path is reached when a query is given an array of root nodes - css-select's selectAll(query, nodes) and cheerio's .find() both call into it - where the algorithm grows with the square of the node count times their depth; the vendor advisory measures roughly 15 seconds for a 50 KB document of 5,000 nested elements with 5,000 matching descendants, and about 1.5 seconds for 280 KB of 40,000 siblings. Impact is bounded to a temporary, recoverable availability loss (no confidentiality or integrity effect), no active exploitation has been confirmed (not in CISA KEV) and the only reference to exploitability is a proof-of-concept snippet published in the GitHub advisory; the vendor-released patch is domutils 4.1.0.
RemediationAI
Upgrade domutils to 4.1.0, the version in which removeSubsets() performs Set-based membership lookups and single-pass compaction; the fixes are visible in commits 2c13c4f8db7838447659608e876099a8d1a28181 and 2c9cac0f3f6905cd91277b82493f1b13d921a1eb and in the v4.1.0 release (advisory: https://github.com/fb55/domutils/security/advisories/GHSA-42h4-gpjh-8xhf). There is no fix for domutils 3.x, and cheerio 1.2.0 pins domutils 3 while remaining incompatible with domutils 4, so cheerio users must adopt workarounds until a cheerio release depends on domutils 4.1.0: limit the number of nodes passed to removeSubsets() and the depth of untrusted documents, or skip the call entirely when every node is distinct and none is an ancestor of another. The trade-off of those workarounds is reduced query flexibility or the need to pre-validate and flatten untrusted markup before it reaches css-select's selectAll() with an array of roots or cheerio's .find(); queries issued against a single root node avoid the affected path altogether.
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 library for manipulating DOM trees produced by htmlparser2/domhandler, and it is a dependency of css-select (and therefore of cheerio). Its removeSubsets() helper is used to drop nodes that are already contained by another node in a supplied array; css-select invokes it on the context nodes whenever a query is given an array of roots, and cheerio's .find() reaches the same code path. The original implementation walked the array backwards, and for every node performed a lastIndexOf() duplicate check plus an includes() scan over the array for each of the node's ancestors, removing entries with splice(). That is the CWE-407 inefficient-algorithm root cause: running time scaled as O(n² · depth) rather than linearly, so a relatively small document (tens to hundreds of kilobytes) could pin a CPU core and stall Node's single-threaded event loop. The fix replaced the repeated linear searches with a Set of members for O(1) ancestor lookups, a separate Set only when duplicates exist, and an in-place compaction pass that writes only when a value actually moves; the same commit also converted a quadratic dedupe in compareDocumentPosition() to a linear backwards Set walk. Note that the trigger is deployment-specific: single-root queries do not enter the hot path, and the impact observed is a temporary event-loop stall rather than a crash or memory-corruption condition.
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:H/SC:N/SI:N/SA:N
Remote, unauthenticated submission of crafted HTML/XML with no user interaction (AV:N/AC:L/PR:N/UI:N); repeatable event-loop blocking gives A:H, with no confidentiality or integrity impact.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
domutils 1.3.0 before 4.1.0 contains an inefficient algorithm in removeSubsets() that allows remote attackers to cause CPU exhaustion by supplying documents with many nested or sibling nodes. Attackers can submit crafted HTML or XML processed by css-select selectAll() or cheerio find() to block the Node.js event loop for seconds.
Articles & Coverage 1
Technical POC Analysis
CWE-407: Inefficient Algorithmic Complexity.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
A high-severity vulnerability in the widely-used npm package domutils (versions 1.3.0 through 4.0.2) allows remote attackers to cause significant availability disruptions by submitting specially crafted HTML/XML that blocks the Node.js event loop for multiple seconds. This affects any application using domutils, cheerio, or css-select for server-side HTML processing, potentially degrading service responsiveness and impacting end users. While no active exploitation has been confirmed, the public proof-of-concept increases risk, and leadership should prioritize patching to prevent potential denial-of-service incidents.
Apply vendor patch.
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
Memory exhaustion in the domutils npm package (versions 2.8.0 through 4.0.2) allows remote attackers to terminate Node.j
Denial of service in the npm package domutils (versions 1.5.0 through 4.0.2) allows an attacker who supplies deeply nest
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-144361
NVD
CVE.org
Vulnrichment
GitHub
VulDB
Exploit-DB