node-sanitize-html — security advisory
Versions of the package sanitize-html before 2.12.1 are vulnerable to Information Exposure when used on the backend and with the style attribute allowed, allowing enumeration of files in the system (including project dependencies). An attacker could exploit this vulnerability to gather details about the file system structure and dependencies of the targeted server.
- Products
- node-sanitize-html
- Affected versions
- 2.14.0+~2.13.0-1, 2.17.0+~2.16.1-1, 2.6.1-1, 2.8.0+~2.6.2-1
- Fixed versions
- Not specified
- CVEs
- CVE-2024-21501
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 01:06 UTC · Revision 1
Source evidence
Versions of the package sanitize-html before 2.12.1 are vulnerable to Information Exposure when used on the backend and with the style attribute allowed, allowing enumeration of files in the system (including project dependencies). An attacker could exploit this vulnerability to gather details about the file system structure and dependencies of the targeted server.
osv:UBUNTU-CVE-2024-21501
node-sanitize-html
Fixed versions: Not specified
node-sanitize-html
Fixed versions: Not specified
node-sanitize-html
Fixed versions: Not specified
node-sanitize-html
Fixed versions: Not specified
node-sanitize-html
Fixed versions: Not specified
Complete source record
{
"id": "525a0c72921746f297965c20f8438783712feddfa60023f77d7bba5d195960df",
"url": "https://osv.dev/vulnerability/UBUNTU-CVE-2024-21501",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "UBUNTU-CVE-2024-21501",
"summary": "Versions of the package sanitize-html before 2.12.1 are vulnerable to Information Exposure when used on the backend and with the style attribute allowed, allowing enumeration of files in the system (including project dependencies). An attacker could exploit this vulnerability to gather details about the file system structure and dependencies of the targeted server.",
"evidence": "osv:UBUNTU-CVE-2024-21501",
"products": [
{
"name": {
"value": "node-sanitize-html",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "2.6.1-1",
"evidence": "/affected/0/versions"
}
]
},
{
"name": {
"value": "node-sanitize-html",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "2.8.0+~2.6.2-1",
"evidence": "/affected/1/versions"
}
]
},
{
"name": {
"value": "node-sanitize-html",
"evidence": "/affected/2/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "2.14.0+~2.13.0-1",
"evidence": "/affected/2/versions"
}
]
},
{
"name": {
"value": "node-sanitize-html",
"evidence": "/affected/3/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "2.14.0+~2.13.0-1",
"evidence": "/affected/3/versions"
},
{
"value": "2.17.0+~2.16.1-1",
"evidence": "/affected/3/versions"
}
]
},
{
"name": {
"value": "node-sanitize-html",
"evidence": "/affected/4/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "2.14.0+~2.13.0-1",
"evidence": "/affected/4/versions"
}
]
}
],
"severity": "medium",
"structured": {
"id": "UBUNTU-CVE-2024-21501",
"aliases": [
"UBUNTU-CVE-2024-21501"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
},
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
},
{
"type": "Ubuntu",
"score": "medium"
}
],
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "node-sanitize-html",
"purl": "pkg:deb/ubuntu/node-sanitize-html?arch=source&distro=jammy",
"ecosystem": "Ubuntu:22.04:LTS"
},
"versions": [
"2.6.1-1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2024/UBUNTU-CVE-2024-21501.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "node-sanitize-html",
"binary_version": "2.6.1-1"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "node-sanitize-html",
"purl": "pkg:deb/ubuntu/node-sanitize-html?arch=source&distro=noble",
"ecosystem": "Ubuntu:24.04:LTS"
},
"versions": [
"2.8.0+~2.6.2-1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2024/UBUNTU-CVE-2024-21501.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "node-sanitize-html",
"binary_version": "2.8.0+~2.6.2-1"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "node-sanitize-html",
"purl": "pkg:deb/ubuntu/node-sanitize-html?arch=source&distro=questing",
"ecosystem": "Ubuntu:25.10"
},
"versions": [
"2.14.0+~2.13.0-1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2024/UBUNTU-CVE-2024-21501.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "node-sanitize-html",
"binary_version": "2.14.0+~2.13.0-1"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "node-sanitize-html",
"purl": "pkg:deb/ubuntu/node-sanitize-html?arch=source&distro=stonking",
"ecosystem": "Ubuntu:26.10"
},
"versions": [
"2.14.0+~2.13.0-1",
"2.17.0+~2.16.1-1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2024/UBUNTU-CVE-2024-21501.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "node-sanitize-html",
"binary_version": "2.17.0+~2.16.1-1"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "node-sanitize-html",
"purl": "pkg:deb/ubuntu/node-sanitize-html?arch=source&distro=resolute",
"ecosystem": "Ubuntu:26.04:LTS"
},
"versions": [
"2.14.0+~2.13.0-1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2024/UBUNTU-CVE-2024-21501.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "node-sanitize-html",
"binary_version": "2.14.0+~2.13.0-1"
}
]
}
}
],
"modified": "2026-10-17T12:56:29.486271809Z",
"provider": "osv",
"upstream": [
"CVE-2024-21501"
],
"references": [
"https://ubuntu.com/security/CVE-2024-21501",
"https://github.com/apostrophecms/sanitize-html/pull/650",
"https://gist.github.com/Slonser/8b4d061abe6ee1b2e10c7242987674cf",
"https://github.com/apostrophecms/apostrophe/discussions/4436",
"https://github.com/apostrophecms/sanitize-html/commit/075499d1b98c387f4200fd59972ca9b15796b51b",
"https://github.com/apostrophecms/sanitize-html/commit/1e2294c8001ce07c89448e03289818da631795ba",
"https://security.snyk.io/vuln/SNYK-JS-SANITIZEHTML-6256334",
"https://github.com/apostrophecms/sanitize-html/commit/c5dbdf77fe8b836d3bf4554ea39edb45281ec0b4",
"https://www.cve.org/CVERecord?id=CVE-2024-21501"
]
},
"related_cves": [
{
"value": "CVE-2024-21501",
"evidence": "/upstream"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 355729,
"published_at": "2024-02-24T05:15:00+00:00"
}