CVE-2022-25887
HIGH7.5EPSS 0.45%Sanitize-html Vulnerable To REDoS Attacks
Published: 8/31/2022Modified: 4/28/2026
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 (2)
- Debian/node-sanitize-htmlfrom 0, < 2.7.1+~2.6.2-1
- npm/sanitize-htmlfrom 0, < 2.7.1
CVSS scores
| Source | Version | Severity | Vector |
|---|---|---|---|
| osv | CVSS 3.1 | HIGH7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
References (6)
- ADVISORYhttps://nvd.nist.gov/vuln/detail/CVE-2022-25887
- ADVISORYhttps://security-tracker.debian.org/tracker/CVE-2022-25887
- WEBhttps://github.com/apostrophecms/sanitize-html/commit/b4682c12fd30e12e82fa2d9b766de91d7d2cd23c
- WEBhttps://github.com/apostrophecms/sanitize-html/pull/557
- WEBhttps://security.snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-3008102
- WEBhttps://security.snyk.io/vuln/SNYK-JS-SANITIZEHTML-2957526