Cross-site scripting in sanitize-html
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Cross-site scripting
- Confidentiality · integrity · availability
- Low · Low · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-79.
Summary
`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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | sanitize-html | before 2.0.0-beta | 2.0.0-beta | Patch available | CNA |
| — | sanitize-html (npm) | before 2.0.0-beta | 2.0.0-beta | Patch available | GHSA-qhxp-v273-g94h |
- sanitize-html Vendor— Affected before 2.0.0-beta Fixed in 2.0.0-beta Patch available CNA
- sanitize-html (npm) Vendor— Affected before 2.0.0-beta Fixed in 2.0.0-beta Patch available GHSA-qhxp-v273-g94h
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:apostrophecms:sanitize-html:*:*:*:*:*:node.js:*:* | before 2.0.0 | Vulnerable | apostrophecms |
- cpe:2.3:a:apostrophecms:sanitize-html:*:*:*:*:*:node.js:*:* Versions before 2.0.0 Vulnerable ·apostrophecms
Remediation
- Fix · CNA sanitize-html Fixed in 2.0.0-beta
- Fix · GHSA-qhxp-v273-g94h sanitize-html (npm) Fixed in 2.0.0-beta Advisory →
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
Not affected: 8 products
- Multicluster Engine for Kubernetes
- Network Observability Operator
- Red Hat Advanced Cluster Management for Kubernetes 2
- Red Hat Developer Hub 1
- Red Hat OpenShift Container Platform 4
- Red Hat OpenShift Dev Spaces
- Red Hat OpenShift GitOps
- Red Hat Quay 3
Timeline
- 2026-10-02 Threatist record created from CVE-2019-25225
- 2026-10-03 Alias added: GHSA-qhxp-v273-g94h
- 2026-10-27 Affected versions changed · Red Hat
References
Exploit 1
Patch 2
Advisory 2
More apostrophecms Sanitize-html vulnerabilities
- TI-2024-14258 Information disclosure in sanitize-html CVSS 3.1MEDIUM 5.3
- TI-2026-29000 ApostropheCMS: sanitize-html allowedTags Bypass via Entity-Decoded Text in nonTextTags Elements CVSS 3.1MEDIUM 6.1
- TI-2014-08427 Cross-site scripting in sanitize-html CVSS 3.1MEDIUM 6.1
- TI-2022-09444 Regular expression denial of service (ReDoS) in sanitize-html CVSS 3.1HIGH 7.5
- TI-2016-09355 sanitize-html before 1.4.3 has XSS. CVSS 3.1MEDIUM 6.1
- TI-2021-08273 Apostrophe Technologies sanitize-html before 2.3.2 does not properly validate the… CVSS 3.1MEDIUM 5.3
Sources
- CVE-2019-25225 · CVE Program
- CVE-2019-25225 · NVD
- FIRST EPSS
- GHSA-qhxp-v273-g94h · GitHub Advisory Database · CC BY 4.0
- CVE-2019-25225 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences