Skip to main content

domutils EUVDEUVD-2026-144269

| CVE-2026-145158 MEDIUM
Inefficient Algorithmic Complexity (CWE-407)
2026-12-04 VulnCheck
6.9
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

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

  1. Access
    Submit deeply nested HTML/XML document
  2. Exploit
    Application calls compareDocumentPosition/uniqueSort on nodes
  3. Execution
    Quadratic ancestor-chain construction consumes CPU
  4. Impact
    Node.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.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available

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

Alert me

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

domutils 1.5.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 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

Vendor (VulnCheck) PRIMARY 6.9 MEDIUM
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
vuln.today AI 5.3 MEDIUM

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.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/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
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

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

Prevalence
High
core DOM utility library behind cheerio/htmlparser2, extremely common in Node.js
Data Quality
5 sources
Confidence: Medium

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 MEDIUM
CISA KEV No
Public POC No
EPSS N/A
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.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· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact· derived
High

Priority Score

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

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

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