NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
📦
📦 npm
Not in CISA KEV
MEDIUM severity

CVE-2024-21501 — sanitize-html

MEDIUMFix: apostrophecms/sanitize-html@c5dbdf7

CVE-2024-21501 is a medium-severity (CVSS 5.3) Information Exposure vulnerability in sanitize-html. A fix is available for sanitize-html — see the affected versions and patch details below.

sanitize-html Information Exposure vulnerability

Also known asGHSA-rm97-x556-q36h
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Nov 10, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

Proof-of-concept exploit code exists

  • CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
  • CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.

Exploitation and automatability from CISA’s SSVC triage for CVE-2024-21501.

EPSS Exploitation Probability

via FIRST.org ↗
1.0%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs64th percentile — riskier than 64% of all scored CVEsHighest risk
0.52%1.11%1.71%2.31%1.8%1.0%May 26Sep 26Nov 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

Where this sits among everything scored

Real-World Exposure

1 pkg affected

How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.

3Kother npm packages depend on this — each one inherits the vulnerability until it's patched upstream
sanitize-htmlnpm
18.1Mdownloads / week

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

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
📦npmsanitize-htmlall versions2.12.1npm install sanitize-html@2.12.1

Affected Products

2 products · 3 configurations
Application
sanitize-htmlapostrophecms
< 2.12.1
range
OS
fedorafedoraproject
2 versions
3940

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for sanitize-html, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update sanitize-html to 2.12.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2024-21501 is resolved across your whole dependency graph.

  3. Workarounds

    Assume what was exposed is already known: rotate any credential, token or key that the affected component could return, restrict the endpoint to callers that genuinely need it, and strip sensitive fields from responses and error output at the boundary rather than relying on the client not to read them.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatModerate
ProductFixed inAdvisory
multicluster engine for Kubernetes 2.4 for RHEL 8multicluster-engine/console-mce-rhel8:v2.4.5-25RHBA-2024:3555
multicluster engine for Kubernetes 2.5 for RHEL 9multicluster-engine/console-mce-rhel9:v2.5.2-6RHBA-2024:1775
Red Hat Advanced Cluster Management for Kubernetes 2.10 for RHEL 9rhacm2/console-rhel9:v2.10.1-3RHBA-2024:1793
Red Hat Advanced Cluster Management for Kubernetes 2.9 for RHEL 8rhacm2/console-rhel8:v2.9.4-22RHBA-2024:3593
Red Hat OpenShift Container Platform 4.15openshift4/ose-monitoring-plugin-rhel8:v4.15.0-202404031310.p0.ge8f7503.assembly.stream.el8RHSA-2024:1770

Frequently Asked Questions

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.
O3 Security · Impact-Aware SCA

Is CVE-2024-21501 in your dependencies?

Find it across npm, including transitive dependencies.

CVE-2024-21501: sanitize-html — Fixed in 2.12.1