Vulnerability · Published Aug 30, 2022 · Assigned by snyk

CVE-2022-25887Regular Expression Denial of Service (ReDoS)

Medium 5.3

In plain English

A medium-severity security flaw in sanitize-html. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 1.6% (higher than 75% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)5.3Medium
Exploit odds (30 days)1.6%top 24.8% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack toolingNoneno public tooling known

Official description

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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12node-sanitize-html2.7.1+~2.6.2-1DEBIAN-CVE-2022-25887
Debian:13node-sanitize-html2.7.1+~2.6.2-1DEBIAN-CVE-2022-25887
Debian:14node-sanitize-html2.7.1+~2.6.2-1DEBIAN-CVE-2022-25887
Ubuntu:25.10jupyter-notebookno fix listedUBUNTU-CVE-2022-25887
Ubuntu:26.10jupyter-notebookno fix listedUBUNTU-CVE-2022-25887
Ubuntu:22.04:LTSnode-sanitize-htmlno fix listedUBUNTU-CVE-2022-25887
Ubuntu:24.04:LTSnode-sanitize-htmlno fix listedUBUNTU-CVE-2022-25887
Ubuntu:25.10node-sanitize-htmlno fix listedUBUNTU-CVE-2022-25887
Ubuntu:26.04:LTSnode-sanitize-htmlno fix listedUBUNTU-CVE-2022-25887
Ubuntu:26.10node-sanitize-htmlno fix listedUBUNTU-CVE-2022-25887
npmsanitize-html2.7.1GHSA-cgfm-xwp7-2cvr

Affected products (as reported)

VendorProductVersions
n/a sanitize-html unspecified – before 2.7.1

References