{"id":"CVE-2019-25225","published":"2025-09-08T10:02:42Z","modified":"2025-09-08T15:18:19Z","title":"`sanitize-html` prior to version 2.0.0-beta is vulnerable to Cross-site Scripting (XSS)","vendor":null,"product":null,"tier":"tail","description":{"text":"`sanitize-html` prior to version 2.0.0-beta is vulnerable to Cross-site Scripting (XSS). The `sanitizeHtml()` function in `index.js` does not sanitize content when using the custom `transformTags` option, which is intended to convert attribute values into text. As a result, malicious input can be transformed into executable code.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.1,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.0028,"percentile":0.20917,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"references":[{"url":"https://github.com/apostrophecms/sanitize-html/issues/293","tags":["issue-tracking"]},{"url":"https://github.com/apostrophecms/sanitize-html/pull/156","tags":[]},{"url":"https://github.com/apostrophecms/sanitize-html/commit/712cb6895825c8bb6ede71a16b42bade42abcaf3","tags":["patch"]},{"url":"https://github.com/Checkmarx/Vulnerabilities-Proofs-of-Concept/tree/main/2019/CVE-2019-25225","tags":["exploit"]}],"priority":{"score":13.5,"factors":[{"name":"EPSS percentile","points":4.18},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":4.27}]},"affectedVersions":[{"vendor":null,"product":null,"versions":["< 2.0.0-beta"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2025-09-08T15:17:07.822892Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"sanitize-html","vulnerableRanges":["<2.0.0-beta"],"patched":["2.0.0-beta"],"from":["GHSA-qhxp-v273-g94h"],"provenance":"source"}],"summary":{"text":"The sanitize-html package, in versions before 2.0.0-beta, contains a cross-site scripting flaw in the sanitizeHtml() function in index.js, where content passed through the custom transformTags option is not sanitized and can be turned into executable code. An attacker can exploit this by supplying malicious input that is processed through transformTags, and user interaction is required for the attack to succeed.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:44:45Z"},"euvd":{"id":"EUVD-2019-19375","exploited":false,"provenance":"source"},"exploitRefs":["https://github.com/Checkmarx/Vulnerabilities-Proofs-of-Concept/tree/main/2019/CVE-2019-25225"],"lineage":{"familyId":"fam-sanitize-html-cve-2016-1000237","parents":[{"from":"CVE-2016-1000237","to":"CVE-2019-25225","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["index.js"],"commits":["https://github.com/apostrophecms/sanitize-html/commit/762fbc7bba389f3f789cc291c1eb2b64f60f2caf","https://github.com/apostrophecms/sanitize-html/commit/712cb6895825c8bb6ede71a16b42bade42abcaf3"],"basis":"shared function","functions":["sanitizeHtml"]}]},{"from":"CVE-2021-26539","to":"CVE-2019-25225","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["index.js"],"commits":["https://github.com/apostrophecms/sanitize-html/commit/712cb6895825c8bb6ede71a16b42bade42abcaf3","https://github.com/apostrophecms/sanitize-html/commit/bdf7836ef8f0e5b21f9a1aab0623ae8fcd09c1da"],"basis":"shared function","functions":["sanitizeHtml"]}]},{"from":"CVE-2022-25887","to":"CVE-2019-25225","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["index.js"],"commits":["https://github.com/apostrophecms/sanitize-html/commit/712cb6895825c8bb6ede71a16b42bade42abcaf3","https://github.com/apostrophecms/sanitize-html/commit/b4682c12fd30e12e82fa2d9b766de91d7d2cd23c"],"basis":"shared function","functions":["sanitizeHtml"]}]},{"from":"CVE-2024-21501","to":"CVE-2019-25225","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["index.js"],"commits":["https://github.com/apostrophecms/sanitize-html/commit/712cb6895825c8bb6ede71a16b42bade42abcaf3","https://github.com/apostrophecms/sanitize-html/commit/c5dbdf77fe8b836d3bf4554ea39edb45281ec0b4"],"basis":"shared function","functions":["sanitizeHtml"]}]},{"from":"CVE-2014-125128","to":"CVE-2019-25225","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["index.js"],"commits":["https://github.com/apostrophecms/sanitize-html/commit/889d4ec968e175f1905b2eb9d33f1fa89217cb02","https://github.com/apostrophecms/sanitize-html/commit/423b90e06e1e85245eccedaabeb3a82840c6cd86","https://github.com/apostrophecms/sanitize-html/commit/712cb6895825c8bb6ede71a16b42bade42abcaf3"],"basis":"shared function","functions":["sanitizeHtml"]}]}]}}