Description
`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.
References (4)
Core 4
Core References
Issue Tracking, Vendor Advisory issue-tracking
https://github.com/apostrophecms/sanitize-html/issues/293
Patch patch
https://github.com/apostrophecms/sanitize-html/commit/712cb6895825c8bb6ede71a16b42bade42abcaf3
Exploit, Third Party Advisory exploit
https://github.com/Checkmarx/Vulnerabilities-Proofs-of-Concept/tree/main/2019/CVE-2019-25225
Issue Tracking, Patch
https://github.com/apostrophecms/sanitize-html/pull/156
Scores
CVSS v3
6.1
EPSS
0.0004
EPSS Percentile
13.3%
Attack Vector
NETWORK
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
CISA SSVC
Vulnrichment
Exploitation
poc
Automatable
no
Technical Impact
partial
Details
CWE
CWE-79
Status
published
Products (2)
apostrophecms/sanitize-html
< 2.0.0
npm/sanitize-html
0 - 2.0.0-betanpm
Published
Sep 08, 2025
Tracked Since
Feb 18, 2026