CVE-2022-25887Regular Expression Denial of Service (ReDoS)
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.
What to do
Fixed builds are available from Debian, npm: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | jupyter-notebook | Fix pending | UBUNTU-CVE-2022-25887 | |
| Ubuntu 26.10 | node-sanitize-html | Fix pending | UBUNTU-CVE-2022-25887 | |
| Ubuntu 26.04 | jupyter-notebook | Not affected vulnerable_code_not_present | ||
| Ubuntu 26.04 | node-sanitize-html | Under investigation | UBUNTU-CVE-2022-25887 | |
| Ubuntu 25.10 | jupyter-notebook | Will not fix jupyter-notebook includes sanitize-html code | UBUNTU-CVE-2022-25887 | |
| Ubuntu 25.10 | node-sanitize-html | Will not fix jupyter-notebook includes sanitize-html code | UBUNTU-CVE-2022-25887 | |
| Ubuntu 24.04 | jupyter-notebook | Fix pending | 6.4.12-2.2ubuntu1+esm1 (Ubuntu Pro) | UBUNTU-CVE-2022-25887 |
| Ubuntu 24.04 | node-sanitize-html | Under investigation | UBUNTU-CVE-2022-25887 | |
| Ubuntu 22.04 | jupyter-notebook | Fix pending | 6.4.8-1ubuntu0.1+esm1 (Ubuntu Pro) | UBUNTU-CVE-2022-25887 |
| Ubuntu 22.04 | node-sanitize-html | Under investigation | UBUNTU-CVE-2022-25887 | |
| Ubuntu 20.04 | jupyter-notebook | Not affected vulnerable_code_not_present | ||
| Ubuntu 18.04 | jupyter-notebook | Will not fix jupyter-notebook includes sanitize-html code | ||
| Debian 14 | node-sanitize-html | Fixed | 2.7.1+~2.6.2-1 | DEBIAN-CVE-2022-25887 |
| Debian 13 | node-sanitize-html | Fixed | 2.7.1+~2.6.2-1 | DEBIAN-CVE-2022-25887 |
| Debian 12 | node-sanitize-html | Fixed | 2.7.1+~2.6.2-1 | DEBIAN-CVE-2022-25887 |
| npm library | sanitize-html | Fixed | 2.7.1 | GHSA-cgfm-xwp7-2cvr |
What the vendor says
As published in the CVE record by snyk, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- sanitize-html: affected: unspecified to before 2.7.1; fixed in
2.7.1
References
- https://security.snyk.io/vuln/SNYK-JS-SANITIZEHTML-2957526
- https://security.snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-3008102
- https://github.com/apostrophecms/sanitize-html/pull/557
- https://github.com/apostrophecms/sanitize-html/commit/b4682c12fd30e12e82fa2d9b766de91d7d2cd23c
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.