CVE-2019-25225Apostrophecms Sanitize-html
Medium 6.1 No auth needed
Follow: this CVE · Apostrophecms · Apostrophecms Sanitize-html We alert you by email or Slack (account required).
- Priority
- 52
- CVSS 3.1
- 6.1
- EPSS
- 0.3% probability of exploitation in 30 days · percentile 24
- Auth required
- No
- Published
- Sep 8, 2025
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-79
- SSVC (CISA)
- Exploitation: proof of concept · Automatable: no · Technical impact: partial
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
What happens
`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.
What to do
- Apply the vendor's security update for Sanitize-html.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| npm | sanitize-html |
< 2.0.0-beta |
2.0.0-beta |
npm install sanitize-html@2.0.0-beta |
Per OSV / GitHub Advisories (GHSA-qhxp-v273-g94h). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| apostrophecms | sanitize-html | < 2.0.0 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Exploit Third Party Advisory
- github.com Patch
- github.com Issue Tracking Vendor Advisory
- github.com Issue Tracking Patch