Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. sanitize-html
  4. ›
  5. CVE-2024-21501

CVE-2024-21501: sanitize-html Information Exposure vulnerability

February 24, 2024 (updated March 6, 2024)

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.

References

  • gist.github.com/Slonser/8b4d061abe6ee1b2e10c7242987674cf
  • github.com/advisories/GHSA-rm97-x556-q36h
  • github.com/apostrophecms/apostrophe/discussions/4436
  • github.com/apostrophecms/sanitize-html
  • github.com/apostrophecms/sanitize-html/commit/c5dbdf77fe8b836d3bf4554ea39edb45281ec0b4
  • github.com/apostrophecms/sanitize-html/pull/650
  • nvd.nist.gov/vuln/detail/CVE-2024-21501
  • security.snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-6276557
  • security.snyk.io/vuln/SNYK-JS-SANITIZEHTML-6256334

Code Behaviors & Features

Detect and mitigate CVE-2024-21501 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 2.12.1

Fixed versions

  • 2.12.1

Solution

Upgrade to version 2.12.1 or above.

Impact 5.3 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

Learn more about CVSS

Weakness

  • CWE-200: Exposure of Sensitive Information to an Unauthorized Actor

Source file

npm/sanitize-html/CVE-2024-21501.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:13 +0000.