CVE-2024-21501: Infoleak

Published Feb 24, 2024
·
Updated

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 Software

4 affected componentsFixes available
npm/sanitize-html<2.12.1
2.12.1
apostrophecms Sanitize-html Node.js<2.12.1
Fedoraproject Fedora=39
Fedoraproject Fedora=40

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/sanitize-html to a version that resolves this vulnerability.

    Fixed in 2.12.1
  2. Upgrade

    Upgrade sanitize-html to a version that resolves this vulnerability.

    Fixed in 2.12.1
  3. Configuration

    Do not allow the HTML "style" attribute when using sanitize-html on the backend (vulnerable when style attribute is allowed).

    sanitize-html style attribute allowed = disallow

Event History

Feb 24, 2024
CVE Published
via MITRE·05:00 AM
Data Sourced
via MITRE·05:00 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·05:15 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·05:15 AM
RemedyAffected Software
Advisory Published
via GitHub·06:30 AM
Feb 26, 2024
Data Sourced
via Red Hat·06:11 PM
DescriptionSeverityAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2024-21501?

CVE-2024-21501 has a medium severity level due to its potential for information exposure.

2

How do I fix CVE-2024-21501?

To fix CVE-2024-21501, update the sanitize-html package to version 2.12.1 or later.

3

Who is affected by CVE-2024-21501?

CVE-2024-21501 affects versions of the sanitize-html package prior to 2.12.1 used in backend applications.

4

What kind of attack can exploit CVE-2024-21501?

An attacker can exploit CVE-2024-21501 to enumerate files in the system, including project dependencies.

5

Should I be concerned about using sanitize-html with allowed style attributes?

Yes, using sanitize-html with allowed style attributes can increase the risk of CVE-2024-21501 being exploited.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203