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

- Severity: Medium 5.3 (CVSS:3.1, scored by snyk) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.60%, higher than 76% of CVEs (2026-12-01)
- Published: 2022-08-30T05:00:20.149Z
- Modified: 2026-06-17T04:34:26.600Z
- Also known as: GHSA-cgfm-xwp7-2cvr
- Weaknesses: CWE-1333
- Assigned by: snyk

## 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.

(As written by CVE List.)

## Affected

- sanitize-html: from unspecified before 2.7.1
- sanitize-html (npm): before 2.7.1
- apostrophecms sanitize-html: before 2.7.1

## Every score

- snyk: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`
- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://security.snyk.io/vuln/SNYK-JS-SANITIZEHTML-2957526> (patch, third-party-advisory, web)
- <https://security.snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-3008102> (patch, third-party-advisory, web)
- <https://github.com/apostrophecms/sanitize-html/pull/557> (issue-tracking, patch, third-party-advisory, web)
- <https://github.com/apostrophecms/sanitize-html/commit/b4682c12fd30e12e82fa2d9b766de91d7d2cd23c> (patch, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-25887> (advisory)

## Sources

- CVE List: [CVE-2022-25887](https://www.cve.org/CVERecord?id=CVE-2022-25887), CVE Terms of Use, modified 2024-09-17
- GitHub Advisory Database: [GHSA-cgfm-xwp7-2cvr](https://github.com/advisories/GHSA-cgfm-xwp7-2cvr), CC-BY-4.0, modified 2024-04-22
- NVD: [CVE-2022-25887](https://nvd.nist.gov/vuln/detail/CVE-2022-25887), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-25887 · Whole record: https://cve.day/CVE-2022-25887.json · Rebuilt by cve.day 2026-11-25T22:58:14.554Z
