CVE-2022-25887 json
Regular Expression Denial of Service (ReDoS)
published 2022-08-30 4 y ago modified 2026-06-17 4 mo ago also GHSA-cgfm-xwp7-2cvr , EUVD-2022-6537
- cvss
- 5.3
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.6%
- EPSS 1.6% chance of exploitation in 30 days, percentile 75%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- npm sanitize-html 2.7.1
- n/a sanitize-html 2.7.1
- node-sanitize-html Debian 14, Debian 13, Debian 12 2.7.1+~2.6.2-1
debian advisories DEBIAN-CVE-2022-25887
- jupyter-notebook Ubuntu Pro 22.04 LTS 6.4.8-1ubuntu0.1+esm1
- jupyter-notebook Ubuntu Pro 24.04 LTS 6.4.12-2.2ubuntu1+esm1
ubuntu advisories UBUNTU-CVE-2022-25887
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2022-25887 updated cvss 5.3
sanitize-html: insecure global regular expression replacement logic may lead to ReDoS
-
Red Hat OpenShift Service Mesh 2.0 servicemesh-prometheusaffected: no fix available
-
Red Hat OpenShift Service Mesh 2.1 servicemesh-prometheusaffected: no fix available “Fix deferred”
-
Red Hat Advanced Cluster Management for Kubernetes 2 rhacm2/console-rhel8 Red Hat Ansible Automation Platform 2 automation-controller Red Hat OpenShift Container Platform 3.11 openshift3/ose-console Red Hat OpenShift Container Platform 4 openshift4/ose-console Red Hat OpenShift Dev Spaces devspaces/dashboard-rhel8affected: no fix available
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
1.55% chance of exploitation in the next 30 days, higher than 75% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
| NVD | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| GitHub | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | sanitize-html | <2.7.1 |
2.7.1 |
Affected products
- n/a sanitize-html
Classification
- Weakness
-
- CWE-1333 Inefficient Regular Expression Complexity
References
-
github.com
/apostrophecms/sanitize-html/pull/557
web, issue-tracking, patch, third-party-advisory
-
github.com
/apostrophecms/sanitize-html/commit/b4682c12fd30e12e82fa2d9b766de91d7d2cd23c
web, patch, third-party-advisory
-
security.snyk.io
/vuln/SNYK-JS-SANITIZEHTML-2957526
web, patch, third-party-advisory
-
security.snyk.io
/vuln/SNYK-JAVA-ORGWEBJARSNPM-3008102
web, patch, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2022-25887
advisory
Sources
- CVE List CVE-2022-25887
- GitHub Advisory GHSA-cgfm-xwp7-2cvr
- NVD CVE-2022-25887
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.