CVE-2022-25887
5.3medium
Regular Expression Denial of Service (ReDoS)
- Severity
- 5.3medium CVSS:3.1 by snyk
- Exploit likelihood
- 1.60% (higher than 76% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- snyk
- Also known as
- GHSA-cgfm-xwp7-2cvr
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
| Product or package | Versions | Reported by |
|---|---|---|
| sanitize-html | from unspecified before 2.7.1 | CVE List |
| sanitize-html (npm) | before 2.7.1 | GitHub Advisory Database |
| apostrophecms sanitize-html | before 2.7.1 | NVD |
All scores
| snyk | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
| GitHub | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Classification
What each source says
CVE List
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.
NVD (es)
El paquete sanitize-html versiones anteriores a 2.7.1, es vulnerable a una Denegación de Servicio por Expresión Regular (ReDoS) debido a una inseguridad de la lógica de reemplazo global de expresiones regulares en la eliminación de comentarios HTML
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
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2022-25887 changed 2024-09-17 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-cgfm-xwp7-2cvr changed 2024-04-22 | CC-BY-4.0 |
| NVD | CVE-2022-25887 changed 2026-06-17 | Public domain |