Skip to main content

domutils EUVDEUVD-2026-144361

| CVE-2026-145165 HIGH
Inefficient Algorithmic Complexity (CWE-407)
2026-12-04 VulnCheck
8.7
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Submit crafted nested/wide HTML or XML
  2. Delivery
    Reach css-select selectAll() or cheerio .find() over many nodes
  3. Exploit
    Trigger quadratic removeSubsets() scan
  4. Execution
    Block Node.js event loop for seconds
  5. Impact
    Deny 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).

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

domutils 1.3.0 <4.1.0

Affected Packages

euvd domutils fix: 4.1.0

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

Vendor (VulnCheck) PRIMARY 8.7 HIGH
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
vuln.today AI 7.5 HIGH

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.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

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.

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

Why It Matters

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.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

Prevalence
High
core DOM utility underlying cheerio/css-select, very large npm transitive-dependency footprint
Data Quality
5 sources
Confidence: Medium
EUVD NVD CVE.org Vulnrichment GitHub VulDB

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS N/A
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Partial

Priority Score

44
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy