CVE-2019-25225
published medium CVSS 3.1 · 6.1sanitize-html: sanitize-html cross site scripting
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Not stated | — | sanitize-html0 to < 2.0.0-beta · Other versions: unaffected | Affected | Not stated | Checkmarx |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 6.1 / 10
- Severity
- medium
- Provider
- Checkmarx · cna
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- Scenarios
- en: GENERAL
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| sanitize-html | 0 to < 2.0.0-beta (affected · npm)Default: unaffected | Checkmarx · cna |
Weaknesses
1- CWE-79 CWE-79 Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting')
References
4- https://github.com/Checkmarx/Vulnerabilities-Proofs-of-Concept/tree/main/2019/CVE-2019-25225
- https://github.com/apostrophecms/sanitize-html/commit/712cb6895825c8bb6ede71a16b42bade42abcaf3
- https://github.com/apostrophecms/sanitize-html/issues/293
- https://github.com/apostrophecms/sanitize-html/pull/156
Provider assertions
2Checkmarx · cna
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- 5e1dbdfc99c59bd7255510aca3f8d75ac62297d57591a6d67f6afa76de6b485d
- Ingested
- 23 Sep 2026, 07:46:49 UTC
- Source record
- Official CVE record