Vulnerability · Published Feb 24, 2024 · Assigned by snyk
CVE-2024-21501
Medium 5.3
In plain English
A medium-severity information exposure in org.webjars.npm:sanitize-html. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 1.0% (higher than 64% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | node-sanitize-html | no fix listed | DEBIAN-CVE-2024-21501 |
| Debian:13 | node-sanitize-html | 2.13.0+~2.11.0-1 | DEBIAN-CVE-2024-21501 |
| Debian:14 | node-sanitize-html | 2.13.0+~2.11.0-1 | DEBIAN-CVE-2024-21501 |
| Ubuntu:22.04:LTS | node-sanitize-html | no fix listed | UBUNTU-CVE-2024-21501 |
| Ubuntu:24.04:LTS | node-sanitize-html | no fix listed | UBUNTU-CVE-2024-21501 |
| Ubuntu:25.10 | node-sanitize-html | no fix listed | UBUNTU-CVE-2024-21501 |
| Ubuntu:26.04:LTS | node-sanitize-html | no fix listed | UBUNTU-CVE-2024-21501 |
| Ubuntu:26.10 | node-sanitize-html | no fix listed | UBUNTU-CVE-2024-21501 |
| npm | sanitize-html | 2.12.1 | GHSA-rm97-x556-q36h |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| n/a | sanitize-html | 0 – before 2.12.1 |
| n/a | org.webjars.npm:sanitize-html | 0 – before * |
Weakness: CWE-200, CWE-538 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N/E:P
References
- https://security.snyk.io/vuln/SNYK-JS-SANITIZEHTML-6256334
- https://security.snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-6276557
- https://gist.github.com/Slonser/8b4d061abe6ee1b2e10c7242987674cf
- https://github.com/apostrophecms/sanitize-html/pull/650
- https://github.com/apostrophecms/apostrophe/discussions/4436
- https://github.com/apostrophecms/sanitize-html/commit/c5dbdf77fe8b836d3bf4554ea39edb45281ec0b4
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/P4I5X6V3LYUNBMZ5YOW4BV427TH3IK4S/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/4EB5JPYRCTS64EA5AMV3INHDPI6I4AW7/