Inefficient Regular Expression Complexity Affecting node-sanitize-html package, versions <2.7.1+~2.6.2-1


Severity

Recommended
0.0
high
0
10

Snyk's Security Team recommends NVD's CVSS assessment. Learn more

Threat Intelligence

EPSS
1.55% (75th 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-DEBIAN14-NODESANITIZEHTML-11762257
  • published10 Aug 2025
  • disclosed30 Aug 2022

Introduced: 30 Aug 2022

CVE-2022-25887  (opens in a new tab)
CWE-1333  (opens in a new tab)

How to fix?

Upgrade Debian:14 node-sanitize-html to version 2.7.1+~2.6.2-1 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream node-sanitize-html package and not the node-sanitize-html package as distributed by Debian. See How to fix? for Debian:14 relevant fixed versions and status.

The package sanitize-html before 2.7.1 are vulnerable to Regular Expression Denial of Service (ReDoS) due to insecure global regular expression replacement logic of HTML comment removal.

CVSS Base Scores

version 3.1