CVE-2024-21501
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.
What to do
Fixed builds are available from Debian, npm: see the table below for the fixed version per release.
Debian, Ubuntu have not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | node-sanitize-html | Fix pending | UBUNTU-CVE-2024-21501 | |
| Ubuntu 26.04 | node-sanitize-html | Under investigation | UBUNTU-CVE-2024-21501 | |
| Ubuntu 25.10 | node-sanitize-html | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-21501 | |
| Ubuntu 24.04 | node-sanitize-html | Under investigation | UBUNTU-CVE-2024-21501 | |
| Ubuntu 22.04 | node-sanitize-html | Under investigation | UBUNTU-CVE-2024-21501 | |
| Debian 14 | node-sanitize-html | Fixed | 2.13.0+~2.11.0-1 | DEBIAN-CVE-2024-21501 |
| Debian 13 | node-sanitize-html | Fixed | 2.13.0+~2.11.0-1 | DEBIAN-CVE-2024-21501 |
| Debian 12 | node-sanitize-html | Fix pending | DEBIAN-CVE-2024-21501 | |
| npm library | sanitize-html | Fixed | 2.12.1 | GHSA-rm97-x556-q36h |
What the vendor says
As published in the CVE record by snyk, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- sanitize-html: affected: before 2.12.1; fixed in
2.12.1 - org.webjars.npm:sanitize-html: affected: all versions
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/
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.