{"id":"CVE-2022-25887","aliases":["CVE-2022-25887","GHSA-cgfm-xwp7-2cvr"],"related":[],"kind":"vulnerability","state":"published","title":"Regular Expression Denial of Service (ReDoS)","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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"es","text":"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","source":"nvd"}],"published":"2022-08-30T05:00:20.149Z","modified":"2026-06-17T04:34:26.600Z","severity":{"scorer":"snyk","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","score":5.3,"rating":"MEDIUM"},"severities":[{"scorer":"snyk","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","score":5.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-1333"],"affected":[{"ranges":[{"type":"custom","introduced":"unspecified","fixed":"2.7.1","status":"affected"}],"product":"sanitize-html","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.7.1"}],"ecosystem":"npm","package":"sanitize-html","purl":"pkg:npm/sanitize-html","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"2.7.1"}],"vendor":"apostrophecms","product":"sanitize-html","cpe":"cpe:2.3:a:apostrophecms:sanitize-html:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://security.snyk.io/vuln/SNYK-JS-SANITIZEHTML-2957526","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://security.snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-3008102","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/apostrophecms/sanitize-html/pull/557","tags":["issue-tracking","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/apostrophecms/sanitize-html/commit/b4682c12fd30e12e82fa2d9b766de91d7d2cd23c","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-25887","tags":["advisory"],"sources":["ghsa"]}],"credits":["Nariyoshi Chida of NTT Security Japan"],"assigner":"snyk","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-25887","url":"https://www.cve.org/CVERecord?id=CVE-2022-25887","licence":"CVE Terms of Use","modified":"2024-09-17T03:07:00.082Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-cgfm-xwp7-2cvr","url":"https://github.com/advisories/GHSA-cgfm-xwp7-2cvr","licence":"CC-BY-4.0","modified":"2024-04-22T23:56:49.765Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-25887","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-25887","licence":"Public domain","modified":"2026-06-17T04:34:26.600Z"}],"updatedAt":"2026-11-25T22:58:14.554Z","epss":{"score":0.01597,"percentile":0.76466,"date":"2026-12-01T12:00:22.000Z"}}