CVE-2019-25225
MEDIUM 6.1CVSS 3.1sanitize-html is vulnerable to XSS through incomprehensive sanitization
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.
- Published
- 8 Sep 2025
- Last modified
- 17 Jun 2026
- Assigned by
- 596c5446-0ce5-4ba2-aa66-48b3b757a647
- NVD status
- Analyzed
- Weakness
- CWE-79
- Also known as
- GHSA-qhxp-v273-g94h
- Sources
- NVDJSONOSV GHSA-qhxp-v273-g94hJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | 596c5446-0ce5-4ba2-aa66-48b3b757a647 (Secondary) | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | apostrophecms | sanitize-htmlcpe:2.3:a:apostrophecms:sanitize-html:*:*:*:*:*:node.js:*:* |
< 2.0.0 | 2.0.0 |
| OSV | npm | sanitize-html | < 2.0.0-beta | 2.0.0-beta |
References
- https://github.com/Checkmarx/Vulnerabilities-Proofs-of-Concept/tree/main/2019/CVE-2019-25225 · Exploit, Third Party Advisory, WEB
- https://github.com/apostrophecms/sanitize-html/commit/712cb6895825c8bb6ede71a16b42bade42abcaf3 · Patch, WEB
- https://github.com/apostrophecms/sanitize-html/issues/293 · Issue Tracking, Vendor Advisory, WEB
- https://github.com/apostrophecms/sanitize-html/pull/156 · Issue Tracking, Patch, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2019-25225 · ADVISORY
- https://github.com/apostrophecms/sanitize-html · PACKAGE
History
- 25 Nov 2026 20:58 UTC · NVD: first stored (published 8 Sep 2025)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 8 Sep 2025)