CVE-2019-25225 Details
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.
A Cross-Site Scripting (XSS) vulnerability exists in the npm package sanitize-html, in versions prior to 2.0.0-beta. The issue arises in the sanitizeHtml() function, which fails to properly sanitize content when the custom transformTags option is used. This oversight allows malicious input to be transformed into executable code, potentially leading to XSS attacks.
Users can upgrade to sanitize-html version 2.0.0-beta or later, where this vulnerability has been addressed.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Sep 8, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/apostrophecms/sanitize-html/commit/712cb6895825c8bb6ede71a16b42bade42abcaf3 | Checkmarx | Patch |
| https://github.com/apostrophecms/sanitize-html/issues/293 | Checkmarx | Issue TrackingVendor Advisory |
| https://github.com/apostrophecms/sanitize-html/pull/156 | Checkmarx | Issue TrackingPatch |
| https://github.com/Checkmarx/Vulnerabilities-Proofs-of-Concept/tree/main/2019/CVE-2019-25225 | Checkmarx | ExploitThird Party Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | Checkmarx |
Affected Products
| Product | Versions |
|---|---|
| apostrophecms sanitize-html | < 2.0.0 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | Checkmarx |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Sep 19, 2025 | Initial Analysis | [email protected] |
| Sep 8, 2025 | New CVE Received | Checkmarx |