CVE-2019-25225
sanitize-html is vulnerable to XSS through incomprehensive sanitization
Reported by checkmarx · Published September 8, 2025
sanitize-html is fixed in 2.0.0-beta (npm)
`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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| sanitize-html | npm | 2.0.0-beta |
| sanitize-html | apostrophecms | 2.0.0 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| 0 | ||
| 0 | ||
| npm | sanitize-html | 0 |
Timeline
- Sep 8, 2025 CVE Published
- Sep 8, 2025 EPSS Score (30 in total, the first dated here)
- Sep 8, 2025 PoC Published (2 in total, the first dated here)
- Sep 19, 2025 CVE Updated
- Mar 9, 2026 Security Advisory
- Sep 11, 2026 Coalition ESS Score
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2019-25225
vulnetix vdb fixes CVE-2019-25225
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2019-25225/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- issue-tracking
- patch
- exploit
- https://nvd.nist.gov/vuln/detail/CVE-2019-25225 advisory
- https://github.com/advisories/GHSA-qhxp-v273-g94h advisory
- https://github.com/apostrophecms/sanitize-html url