Uncontrolled Recursion Affecting org.webjars.npm:domutils package, versions [0,]


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.97% (64th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JAVA-ORGWEBJARSNPM-23745879
  • published4 Dec 2026
  • disclosed4 Dec 2026
  • creditUgur Celik

Introduced: 4 Dec 2026

NewCVE-2026-145166  (opens in a new tab)
CWE-674  (opens in a new tab)

How to fix?

A fix was pushed into the master branch but not yet published.

Overview

Affected versions of this package are vulnerable to Uncontrolled Recursion via findOne(), existsOne(), and getElementById(), which recurse once per level of nesting in a document. An attacker can supply HTML or XML with approximately 20,000 nested elements to exhaust the JavaScript call stack, causing a RangeError that results in request failures or process termination.

PoC

import { parseDocument } from "htmlparser2";
import { findOne } from "domutils";

findOne(() => false, parseDocument("<b>".repeat(20_000)).children);
// RangeError: Maximum call stack size exceeded

CVSS Base Scores

version 4.0
version 3.1