{"id":"CVE-2022-25887","aliases":["CLSA-2026-1776645373","DEBIAN-CVE-2022-25887","EUVD-2022-6537","GHSA-cgfm-xwp7-2cvr","ROOT-APP-NPM-CVE-2022-25887","UBUNTU-CVE-2022-25887","USN-7464-1"],"status":"published","title":"Regular Expression Denial of Service (ReDoS)","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.","severity":{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-11","score":0.01551,"percentile":0.75429,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-1333"],"published":"2022-08-30T05:00:20Z","modified":"2026-11-04T20:01:08Z","fixes":[{"ecosystem":"npm","package":"sanitize-html","fixed_in":["2.7.1"],"sources":["ghsa","osv"]},{"ecosystem":"TuxCare:npm","package":"sanitize-html","fixed_in":["1.27.5-tuxcare.3"],"sources":["osv"]},{"ecosystem":"Debian:12","package":"node-sanitize-html","fixed_in":["2.7.1+~2.6.2-1"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"node-sanitize-html","fixed_in":["2.7.1+~2.6.2-1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"node-sanitize-html","fixed_in":["2.7.1+~2.6.2-1"],"sources":["osv"]},{"ecosystem":"Root:npm","package":"@rootio/sanitize-html","fixed_in":["1.4.2-root.io.1","1.4.2-root.io.2","1.4.2-root.io.3","1.4.2-root.io.4","1.4.2-root.io.5","1.4.2-root.io.6","1.4.2-root.io.7","1.4.2-root.io.8","1.4.2-root.io.9"],"sources":["osv"]},{"ecosystem":"Root:npm","package":"sanitize-html","fixed_in":["1.4.2-aikido.9"],"sources":["osv"]},{"ecosystem":"Ubuntu:Pro:22.04:LTS","package":"jupyter-notebook","fixed_in":["6.4.8-1ubuntu0.1+esm1"],"sources":["osv"]},{"ecosystem":"Ubuntu:Pro:24.04:LTS","package":"jupyter-notebook","fixed_in":["6.4.12-2.2ubuntu1+esm1"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"sanitize-html","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.7.1"}]}]},{"source":"osv","ecosystem":"TuxCare:npm","package":"sanitize-html","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.27.5-tuxcare.0"},{"fixed":"1.27.5-tuxcare.3"}]}],"versions":["1.27.5","1.27.5-tuxcare.1","1.27.5-tuxcare.2"]},{"source":"osv","ecosystem":"Debian:12","package":"node-sanitize-html","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.7.1+~2.6.2-1"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"node-sanitize-html","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.7.1+~2.6.2-1"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"node-sanitize-html","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.7.1+~2.6.2-1"}]}]},{"source":"osv","ecosystem":"npm","package":"sanitize-html","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.7.1"}]}]},{"source":"osv","ecosystem":"Root:npm","package":"@rootio/sanitize-html","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.4.2-root.io.1"},{"fixed":"1.4.2-root.io.2"},{"fixed":"1.4.2-root.io.3"},{"fixed":"1.4.2-root.io.4"},{"fixed":"1.4.2-root.io.5"},{"fixed":"1.4.2-root.io.6"},{"fixed":"1.4.2-root.io.7"},{"fixed":"1.4.2-root.io.8"},{"fixed":"1.4.2-root.io.9"}]}]},{"source":"osv","ecosystem":"Root:npm","package":"sanitize-html","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.4.2-aikido.9"}]}]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"node-sanitize-html","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.6.1-1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:22.04:LTS","package":"jupyter-notebook","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"6.4.8-1ubuntu0.1+esm1"}]}],"versions":["6.2.0-1","6.4.5-2","6.4.5-3","6.4.5-4","6.4.8-1","6.4.8-1ubuntu0.1"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"node-sanitize-html","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.8.0+~2.6.2-1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:24.04:LTS","package":"jupyter-notebook","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"6.4.12-2.2ubuntu1+esm1"}]}],"versions":["6.4.12-2.2","6.4.12-2.2ubuntu1"]},{"source":"osv","ecosystem":"Ubuntu:25.10","package":"jupyter-notebook","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["6.4.13-5","6.4.13-5ubuntu0.1"]},{"source":"osv","ecosystem":"Ubuntu:25.10","package":"node-sanitize-html","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.14.0+~2.13.0-1"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"jupyter-notebook","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["6.4.13-5ubuntu0.1"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"node-sanitize-html","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.14.0+~2.13.0-1","2.17.0+~2.16.1-1"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"node-sanitize-html","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.14.0+~2.13.0-1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:22.04:LTS","package":"jupyter-notebook","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"6.4.8-1ubuntu0.1+esm1"}]}],"versions":["6.2.0-1","6.4.5-2","6.4.5-3","6.4.5-4","6.4.8-1","6.4.8-1ubuntu0.1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:24.04:LTS","package":"jupyter-notebook","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"6.4.12-2.2ubuntu1+esm1"}]}],"versions":["6.4.12-2.2","6.4.12-2.2ubuntu1"]}],"products":[{"vendor":"apostrophecms","product":"sanitize-html"}],"references":[{"url":"https://security.snyk.io/vuln/SNYK-JS-SANITIZEHTML-2957526","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","web","report"]},{"url":"https://security.snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-3008102","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","web","report"]},{"url":"https://github.com/apostrophecms/sanitize-html/pull/557","tags":["x_refsource_MISC","x_transferred","Issue Tracking","Patch","Third Party Advisory","fix","web","report"]},{"url":"https://github.com/apostrophecms/sanitize-html/commit/b4682c12fd30e12e82fa2d9b766de91d7d2cd23c","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web","report"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-25887","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-cgfm-xwp7-2cvr"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/25xxx/CVE-2022-25887.json","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2022-25887","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2022-25887","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2022-25887","tags":["report"]},{"url":"https://ubuntu.com/security/notices/USN-7464-1","tags":["advisory"]}],"sources":{"cve":[{"id":"CVE-2022-25887","title":"Regular Expression Denial of Service (ReDoS)","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.","status":"published","published":"2022-08-30T05:00:20.149Z","modified":"2024-09-17T03:07:00.082Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","level":"medium","assessor":"cna"}],"updated_at":"2026-11-02T14:34:28.707644Z"}],"euvd":[{"id":"EUVD-2022-6537","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.","status":"published","published":"2022-08-30T05:00:20Z","modified":"2024-09-17T03:07:00Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","level":"medium"}],"updated_at":"2026-11-03T00:28:34.673232Z"}],"ghsa":[{"id":"GHSA-cgfm-xwp7-2cvr","title":"Sanitize-html Vulnerable To REDoS Attacks","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.","status":"published","published":"2022-08-31T00:00:24Z","modified":"2024-04-22T23:16:47Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-1333"],"updated_at":"2026-11-02T14:37:44.335614Z"}],"nvd":[{"id":"CVE-2022-25887","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.","status":"published","published":"2022-08-30T05:15:07.727Z","modified":"2026-06-17T04:34:26.6Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","level":"medium","assessor":"secondary"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"primary"}],"cwes":["CWE-1333"],"updated_at":"2026-11-02T14:07:25.883929Z"}],"osv":[{"id":"CVE-2022-25887","title":"Regular Expression Denial of Service (ReDoS)","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.","status":"published","published":"2022-08-30T05:00:20.149Z","modified":"2026-10-28T02:30:36.903888673Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","level":"medium"}],"updated_at":"2026-11-02T15:44:24.758293Z"},{"id":"DEBIAN-CVE-2022-25887","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.","status":"published","published":"2022-08-30T05:15:07.727Z","modified":"2026-11-03T08:02:47.526406496Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-03T08:24:39.643572Z"},{"id":"GHSA-cgfm-xwp7-2cvr","title":"Sanitize-html Vulnerable To REDoS Attacks","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.","status":"published","published":"2022-08-31T00:00:24Z","modified":"2024-04-22T23:56:49.765909Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-1333"],"updated_at":"2026-11-02T15:46:44.927642Z"},{"id":"UBUNTU-CVE-2022-25887","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.","status":"published","published":"2022-08-30T05:15:00Z","modified":"2026-11-04T20:01:08.730246237Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","level":"medium"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-04T20:16:32.566315Z"},{"id":"CLSA-2026-1776645373","title":"TuxCare security update for sanitize-html (1 CVE)","description":"TuxCare rebuilt sanitize-html to address 1 CVE. Fixed in 1.27.5-tuxcare.3.","status":"published","published":"2026-08-04T14:52:27Z","modified":"2026-10-15T09:47:02.862430635Z","updated_at":"2026-11-02T15:43:44.009773Z"},{"id":"ROOT-APP-NPM-CVE-2022-25887","title":"CVE-2022-25887 in @rootio/sanitize-html - Patched by Root","description":"Root has patched CVE-2022-25887 in the @rootio/sanitize-html package for Root:npm. Multiple fixed versions available.","status":"published","published":"2026-06-04T20:57:52Z","modified":"2026-06-05T01:30:10.371334895Z","updated_at":"2026-11-02T15:53:27.362922Z"},{"id":"USN-7464-1","title":"jupyter-notebook vulnerability","description":"It was discovered that Jupyter Notebook did not properly parse HTML\ncomments under certain circumstances. An attacker could possibly use this\nissue to cause a regular expression denial of service (ReDoS).\n","status":"published","published":"2025-04-28T00:57:31Z","modified":"2026-04-27T17:55:25.497358Z","updated_at":"2026-11-02T16:58:19.988474Z"}]}}
