{"id":"GHSA-qhxp-v273-g94h","summary":"sanitize-html is vulnerable to XSS through incomprehensive sanitization","details":"`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.","aliases":["CVE-2019-25225"],"modified":"2025-09-12T20:27:20.408277Z","published":"2025-09-08T12:30:33Z","database_specific":{"github_reviewed_at":"2025-09-12T20:01:43Z","nvd_published_at":"2025-09-08T10:15:33Z","cwe_ids":["CWE-79"],"severity":"MODERATE","github_reviewed":true},"references":[{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2019-25225"},{"type":"WEB","url":"https://github.com/apostrophecms/sanitize-html/issues/293"},{"type":"WEB","url":"https://github.com/apostrophecms/sanitize-html/pull/156"},{"type":"WEB","url":"https://github.com/apostrophecms/sanitize-html/commit/712cb6895825c8bb6ede71a16b42bade42abcaf3"},{"type":"WEB","url":"https://github.com/Checkmarx/Vulnerabilities-Proofs-of-Concept/tree/main/2019/CVE-2019-25225"},{"type":"PACKAGE","url":"https://github.com/apostrophecms/sanitize-html"}],"affected":[{"package":{"name":"sanitize-html","ecosystem":"npm","purl":"pkg:npm/sanitize-html"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.0.0-beta"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/09/GHSA-qhxp-v273-g94h/GHSA-qhxp-v273-g94h.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"}]}