CVE-2024-21501
published medium CVSS 3.1 · 5.3sanitize-html: Information Exposure when used on the backend
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| n/a | — | sanitize-html0 to < 2.12.1 | Affected | Not stated | snyk |
| n/a | — | org.webjars.npm:sanitize-html0 and later | Affected | Not stated | snyk |
| apostrophecms | — | sanitize-html0 to < 2.12.1 · Other versions: unknown | Affected | Not stated | CISA-ADP |
Description
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.
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
- 5.3 / 10
- Severity
- medium
- Provider
- snyk · cna
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N/E:P
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| n/a | sanitize-html | 0 to < 2.12.1 (affected · semver) | snyk · cna |
| n/a | org.webjars.npm:sanitize-html | 0 and later (affected · semver) | snyk · cna |
| apostrophecms | sanitize-html | 0 to < 2.12.1 (affected · semver)Default: unknown | CISA-ADP · adp |
Weaknesses
2- CWE-200 Information Exposure
- CWE-538 CWE-538 Insertion of Sensitive Information into Externally-Accessible File or Directory
References
8- https://gist.github.com/Slonser/8b4d061abe6ee1b2e10c7242987674cf
- https://github.com/apostrophecms/apostrophe/discussions/4436
- https://github.com/apostrophecms/sanitize-html/commit/c5dbdf77fe8b836d3bf4554ea39edb45281ec0b4
- https://github.com/apostrophecms/sanitize-html/pull/650
- https://lists.fedoraproject.org/archives/list/[email protected]/message/4EB5JPYRCTS64EA5AMV3INHDPI6I4AW7/
- https://lists.fedoraproject.org/archives/list/[email protected]/message/P4I5X6V3LYUNBMZ5YOW4BV427TH3IK4S/
- https://security.snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-6276557
- https://security.snyk.io/vuln/SNYK-JS-SANITIZEHTML-6256334
Provider assertions
3snyk · cna
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- 7d62a2f7d1af00eb867b1a021574a1574f10720c6d7fd0e566e10e0ed6b71269
- Ingested
- 23 Sep 2026, 08:19:02 UTC
- Source record
- Official CVE record