High severity · published Aug 30, 2022
CVE-2022-25887
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…
7.5
CVSS
1.6%
EPSS
No
On KEV
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.
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Confidentiality
None
Integrity
None
Availability
High
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)1.6% · higher than 75% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
SA
Sanitize-html · Apostrophecms
before 2.7.1 · source: NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2022-25887
CVE.org
https://www.cve.org/CVERecord?id=CVE-2022-25887
Patch
https://github.com/apostrophecms/sanitize-html/commit/b4682c12fd30e12e82fa2d9b766de91d7d2cd23c
Issue Tracking
https://github.com/apostrophecms/sanitize-html/pull/557
Patch
https://security.snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-3008102
Patch
https://security.snyk.io/vuln/SNYK-JS-SANITIZEHTML-2957526
More from Sanitize-html
9.3
CVE-2026-44990
Apostrophe has default XSS via `xmp` raw-text passthrough in `sanitize-html`
6.1
CVE-2026-40186
ApostropheCMS: sanitize-html allowedTags Bypass via Entity-Decoded Text in nonTextTags Elements
6.1
CVE-2014-125128
'sanitize-html' prior to version 1.0.3 is vulnerable to Cross-site Scripting (XSS)
6.1
CVE-2019-25225
`sanitize-html` prior to version 2.0.0-beta is vulnerable to Cross-site Scripting (XSS)
6.1
CVE-2016-1000237
sanitize-html before 1.4.3 has XSS
