Uncontrolled Recursion Affecting sanitize-html package, versions >=2.18.0 <2.18.1


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.3% (22nd 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-JS-SANITIZEHTML-21281008
  • published20 Oct 2026
  • disclosed20 Oct 2026
  • creditUnknown

Introduced: 20 Oct 2026

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

How to fix?

Upgrade sanitize-html to version 2.18.1 or higher.

Overview

sanitize-html is a library that allows you to clean up user-submitted HTML, preserving whitelisted elements and whitelisted attributes on a per-element basis

Affected versions of this package are vulnerable to Uncontrolled Recursion via its transitive dependency on deepmerge, which is affected by CVE-2026-93753. When sanitize-html merges configuration objects combining tag-specific and wildcard allowedClasses or allowedStyles entries, the deepmerge call could be exploited to cause a crash. The fix removes the deepmerge dependency entirely, replacing it with simple array concatenation.

CVSS Base Scores

version 4.0
version 3.1