Skip to main content

domutils CVE-2026-145167

| EUVDEUVD-2026-144359 MEDIUM
Uncontrolled Recursion (CWE-674)
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 ~10,000-level nested HTML/XML document
  2. Exploit
    Application calls getText/textContent/innerText
  3. Execution
    Recursive walk exhausts Node.js call stack
  4. Impact
    Uncaught RangeError fails request or terminates process

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Recursion depth limits
Exploitation Conditions

Exploitation requires that the application extract text from attacker-controlled HTML or XML by calling domutils' getText(), textContent() or innerText() on a running domutils version in the range >=1.1.0 through <=4.0.2 (getText() affected from 1.1.0; textContent() and innerText() from 2.7.0), often reached transitively through cheerio or htmlparser2. The attacker must be able to supply a sufficiently deeply nested document (about 10,000 nested levels / ~30 KB on Node.js default stack). No authentication (PR:N) or user interaction is needed, and no non-default configuration is required beyond the application choosing to extract text from untrusted input. The main limiting factor is error handling: applications that catch the thrown RangeError or reject over-deep documents before extraction degrade the impact to a single failed request rather than full process termination; applications that never parse untrusted documents are not exposed.

Impact

The input CVSS 4.0 base score is 6.9 (medium) with vector AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L - remotely reachable, no authentication (PR:N), no user interaction, and low attack complexity, so the function is trivial to reach once reachable, but the only impact is availability (VA:L) with no confidentiality or integrity effect. This is a denial-of-service primitive (CWE-674 uncontrolled recursion), not a data-exposure or code-execution flaw, which is why the 'Information Disclosure' tag conflicts with the impact metrics and should be disregarded. The vuln.today decision label is 'this_month' (not act_now/emergency), consistent with a medium-severity DoS warranting scheduled rather than emergency patching. No EPSS score was provided and there is no CISA KEV listing, so there is no evidence of active exploitation - treat it as 'no public exploit identified as weaponized in the wild,' though a public proof-of-concept exists in the vendor GHSA advisory, meaning the condition is trivial to trigger for anyone who looks. The real risk is concentrated and conditional: it matters only where an application passes attacker-controlled HTML/XML to domutils' getText(), textContent() or innerText() (frequently as a transitive dependency via cheerio/htmlparser2); such deployments should prioritize it, while applications that never parse untrusted documents or that already catch parser errors face limited exposure.

Exploit ScenarioDerived

An attacker submits an HTML or XML document containing roughly 10,000 nested elements (about 30 KB) to an endpoint that extracts text using domutils' getText(), textContent() or innerText(). The recursive text walk exhausts the Node.js call stack and throws a RangeError; if the application does not catch it, the request fails or the entire Node.js process terminates, denying service to all users. A working proof-of-concept is published 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

Stack exhaustion in the npm package domutils (versions 1.1.0 through 4.0.2) lets unauthenticated remote attackers crash or stall a Node.js process by supplying a deeply nested HTML or XML document that is passed to getText(), textContent() or innerText(). Those three helpers recursed once per nesting level, so roughly 10,000 nested tags (about 30 KB) exhaust Node's default call stack and throw a RangeError; applications that do not catch it fail the request or terminate the process. The assessed impact is availability only (CVSS:3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H), the vendor fix in 4.1.0 replaces recursion with an explicit stack, and a public PoC reference exists in the upstream advisory but is not verified as working exploit code; no confirmed active exploitation (CISA KEV) is reported.

RemediationAI

Upgrade domutils to 4.1.0, which replaces the recursive text walk with an iterative implementation and is the vendor's complete fix (advisory: https://github.com/fb55/domutils/security/advisories/GHSA-f3vc-4w2g-4762, patch commit: https://github.com/fb55/domutils/commit/22fd0ad6c58ef9d2e35363310dc4976c767952eb); where domutils is pulled in transitively by htmlparser2 or cheerio, force the resolution to 4.1.0 or later via your package manager's override/resolution mechanism and re-check the lockfile. If upgrading cannot be done immediately, the vendor-documented workarounds are to wrap getText(), textContent() and innerText() calls in try/catch and treat a thrown RangeError as an invalid document, or to reject documents nested deeper than the application actually needs before extraction - both keep the process alive but leave stack exhaustion reachable, so a failed request is still possible and legitimate deeply nested markup may be refused. Applications that never extract text from untrusted HTML or XML are not exposed and can schedule the upgrade normally.

Affected VersionsENISA

domutils 1.1.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 operates on the domhandler node tree produced by htmlparser2 and provides the text-extraction primitives behind higher-level libraries such as cheerio. The root cause is CWE-674 (Uncontrolled Recursion): in src/stringify.ts, getText(), textContent() and innerText() implemented the DOM-style text concatenation algorithm by calling themselves once for every child array they descended into, so call-stack consumption scaled linearly with document nesting depth rather than with the size of the input. On a Node.js runtime with the default stack size, roughly 10,000 nested <b> tags (approximately 30 KB of markup) were sufficient to raise 'RangeError: Maximum call stack size exceeded' on version 4.0.2. Beyond the plain recursion, the fix commit (22fd0ad6) rewrites all three functions to share an iterative collectText() walk that keeps explicit parents/indices/ends stacks and stops reading each child list at the length it had when the walk entered it, which also guards against nodes being appended while text is being read; the accompanying tests exercise a 20,000-deep document and a mutated-during-read tree. The affected surface is the text-extraction path only; parsing itself is not the problem, which is why exposure depends on whether an application calls these helpers on untrusted markup.

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 7.5 HIGH

Remote, unauthenticated, low-complexity trigger (AV:N/AC:L/PR:N/UI:N); no confidentiality or integrity impact; A:H because an uncaught RangeError terminates the whole Node.js process.

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
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

domutils 1.1.0 before 4.1.0 contains an uncontrolled recursion vulnerability in getText(), textContent() and innerText() in src/stringify.ts that allows attackers to exhaust the call stack. Attackers can supply HTML or XML documents with about 10,000 nested levels to trigger a RangeError, failing requests or terminating the Node.js process.

Threat Intelligence Overview

Prevalence
High
widely-used Node.js DOM utility, core dependency of cheerio and htmlparser2
Data Quality
5 sources
Confidence: Medium
EUVD NVD CVE.org Vulnrichment GitHub

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
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact· derived
High
Technical Impact
Partial

Priority Score

34
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +34
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