Medium
Security advisory
`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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2019-25225
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 1 Nov 2026, 08:37 UTC · Revision 1
Source evidence
`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.
osv:CVE-2019-25225
Complete source record
{
"id": "579747ebe25bfd23758e606e3657abe4996946bf6c138efb73efde56fe42bd95",
"url": "https://osv.dev/vulnerability/CVE-2019-25225",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CVE-2019-25225",
"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.",
"evidence": "osv:CVE-2019-25225",
"products": [],
"severity": "medium",
"structured": {
"id": "CVE-2019-25225",
"aliases": [
"CVE-2019-25225",
"GHSA-qhxp-v273-g94h"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/apostrophecms/apostrophe",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "f8fec4d500f7875e716223578beb5b2f3afaff09"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:apostrophecms:sanitize-html:*:*:*:*:*:node.js:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "2.0.0"
}
],
"source": "CPE_RANGE"
}
]
}
}
],
"versions": [
"0.6.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2019-25225.json"
}
},
{
"ranges": [
{
"repo": "https://github.com/apostrophecms/sanitize-html",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "ca28bcd95a9bfd2e1ea31bb9e7e5901f9078e875"
},
{
"fixed": "712cb6895825c8bb6ede71a16b42bade42abcaf3"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:apostrophecms:sanitize-html:*:*:*:*:*:node.js:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "2.0.0"
}
],
"source": "CPE_RANGE"
},
{
"range": [
{
"fixed": "712cb6895825c8bb6ede71a16b42bade42abcaf3"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
}
],
"versions": [
"1.27.4",
"1.22.0",
"1.21.1",
"1.21.0",
"1.20.0",
"1.19.3",
"1.19.2",
"1.19.1",
"1.19.0",
"1.18.5",
"1.18.4",
"1.18.3",
"1.18.2",
"1.11.4",
"1.11.1",
"1.11.0",
"1.10.1",
"v1.9.0",
"v1.8.0",
"v1.7.2",
"v1.7.1",
"v1.7.0",
"v1.5.2"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2019-25225.json"
}
}
],
"modified": "2026-10-24T10:47:43.465772657Z",
"provider": "osv",
"references": [
"https://github.com/apostrophecms/sanitize-html/issues/293",
"https://github.com/apostrophecms/sanitize-html/commit/712cb6895825c8bb6ede71a16b42bade42abcaf3",
"https://github.com/apostrophecms/sanitize-html/pull/156",
"https://github.com/Checkmarx/Vulnerabilities-Proofs-of-Concept/tree/main/2019/CVE-2019-25225"
],
"provider_metadata": {}
},
"related_cves": [
{
"value": "CVE-2019-25225",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 441498,
"published_at": "2025-09-08T10:15:33.44+00:00"
}