Skip to content
Heist/ feed
Back to feed
Medium

Security advisory

Type: advisorySources: OSVCVE: 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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2024-21501
Confirmed fixed CVEs
Not specified
Updated in this feed
7 Nov 2026, 06:37 UTC · Revision 1

Source evidence

CVE-2024-21501

core-osv · Original source

Published 24 Feb 2024, 05:00 UTC

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.

osv:CVE-2024-21501
Complete source record
{
  "id": "2679b6ff16069f08d69d0335f2f67036ca697481945a84d8a1bd53dfe38eb70f",
  "url": "https://osv.dev/vulnerability/CVE-2024-21501",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2024-21501",
    "summary": "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.",
    "evidence": "osv:CVE-2024-21501",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2024-21501",
      "aliases": [
        "CVE-2024-21501",
        "GHSA-rm97-x556-q36h"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N/E:P"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/apostrophecms/apostrophe",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "4a7d7dd099b41c909f2faac056d34cf027515079"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:apostrophecms:sanitize-html:*:*:*:*:*:node.js:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "2.12.1"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            },
            {
              "repo": "https://github.com/apostrophecms/sanitize-html",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "4a7d7dd099b41c909f2faac056d34cf027515079"
                },
                {
                  "fixed": "c5dbdf77fe8b836d3bf4554ea39edb45281ec0b4"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:apostrophecms:sanitize-html:*:*:*:*:*:node.js:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "2.12.1"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "c5dbdf77fe8b836d3bf4554ea39edb45281ec0b4"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "2.8.1",
            "2.7.3",
            "2.7.2",
            "2.7.1",
            "2.5.3",
            "2.3.3",
            "1.27.4",
            "1.22.0",
            "1.21.1",
            "1.21.0",
            "1.20.0",
            "1.19.3",
            "1.19.2",
            "1.19.1",
            "1.19.0",
            "1.18.5",
            "1.18.4",
            "1.18.3",
            "1.18.2",
            "1.11.4",
            "1.11.1",
            "1.11.0",
            "1.10.1",
            "v1.9.0",
            "v1.8.0",
            "v1.7.2",
            "v1.7.1",
            "v1.7.0",
            "v1.5.2",
            "2.11.0",
            "2.10.0",
            "2.9.0",
            "2.8.0",
            "2.7.0",
            "2.6.1",
            "2.6.0",
            "2.5.2",
            "2.5.1",
            "2.5.0",
            "2.4.0",
            "2.3.2",
            "2.3.1",
            "2.3.0",
            "2.2.0",
            "2.1.2",
            "2.1.1",
            "2.1.0",
            "2.0.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-21501.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:49.875266853Z",
      "provider": "osv",
      "references": [
        "https://gist.github.com/Slonser/8b4d061abe6ee1b2e10c7242987674cf",
        "https://github.com/apostrophecms/apostrophe/discussions/4436",
        "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/4EB5JPYRCTS64EA5AMV3INHDPI6I4AW7/",
        "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/P4I5X6V3LYUNBMZ5YOW4BV427TH3IK4S/",
        "https://security.snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-6276557",
        "https://security.snyk.io/vuln/SNYK-JS-SANITIZEHTML-6256334",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/21xxx/CVE-2024-21501.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2024-21501",
        "https://github.com/apostrophecms/sanitize-html/commit/c5dbdf77fe8b836d3bf4554ea39edb45281ec0b4",
        "https://github.com/apostrophecms/sanitize-html/pull/650"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-200"
        ],
        "cna_assigner": "snyk",
        "unresolved_ranges": [
          {
            "extracted_events": [
              {
                "range": [
                  {
                    "fixed": "*"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StandardRange"
              }
            ]
          }
        ],
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/21xxx/CVE-2024-21501.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2024-21501",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 518523,
  "published_at": "2024-02-24T05:00:02.731+00:00"
}