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.

Severity (CVSS 3.1)5.3Medium
Exploit odds (30 days)1.0%top 36.2% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

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

EcosystemPackageFixed inAdvisory
Debian:12node-sanitize-htmlno fix listedDEBIAN-CVE-2024-21501
Debian:13node-sanitize-html2.13.0+~2.11.0-1DEBIAN-CVE-2024-21501
Debian:14node-sanitize-html2.13.0+~2.11.0-1DEBIAN-CVE-2024-21501
Ubuntu:22.04:LTSnode-sanitize-htmlno fix listedUBUNTU-CVE-2024-21501
Ubuntu:24.04:LTSnode-sanitize-htmlno fix listedUBUNTU-CVE-2024-21501
Ubuntu:25.10node-sanitize-htmlno fix listedUBUNTU-CVE-2024-21501
Ubuntu:26.04:LTSnode-sanitize-htmlno fix listedUBUNTU-CVE-2024-21501
Ubuntu:26.10node-sanitize-htmlno fix listedUBUNTU-CVE-2024-21501
npmsanitize-html2.12.1GHSA-rm97-x556-q36h

Affected products (as reported)

VendorProductVersions
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