CVE-2024-21501
JSON

5.3medium

sanitize-html Information Exposure vulnerability

Severity
5.3medium CVSS:3.1 by snyk
Exploit likelihood
1.02% (higher than 64% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
snyk
Also known as
GHSA-rm97-x556-q36h

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

Product or packageVersionsReported by
sanitize-htmlbefore 2.12.1CVE List
org.webjars.npm:sanitize-htmlbefore *CVE List
apostrophecms sanitize-htmlbefore 2.12.1CVE List, NVD
sanitize-html (npm)before 2.12.1GitHub Advisory Database
fedoraproject fedora39, 40NVD

All scores

snyk5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N/E:P
GitHub5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
NVD5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

Classification

CWE-200CWE-538

SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial.

What each source says

CVE List

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.

NVD (es)

Las versiones del paquete sanitize-html anteriores a la 2.12.1 son vulnerables a la exposición de la información cuando se usan en el backend y con el atributo de estilo permitido, lo que permite la enumeración de archivos en el sistema (incluidas las dependencias del proyecto). Un atacante podría aprovechar esta vulnerabilidad para recopilar detalles sobre la estructura del sistema de archivos y las dependencias del servidor objetivo.

References

https://security.snyk.io/vuln/SNYK-JS-SANITIZEHTML-6256334exploit, third-party-advisory, web
https://security.snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-6276557exploit, third-party-advisory, web
https://gist.github.com/Slonser/8b4d061abe6ee1b2e10c7242987674cfexploit, third-party-advisory, web
https://github.com/apostrophecms/sanitize-html/pull/650patch, web
https://github.com/apostrophecms/apostrophe/discussions/4436issue-tracking, web
https://github.com/apostrophecms/sanitize-html/commit/c5dbdf77fe8b836d3bf4554ea39edb45281ec0b4patch, web
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/P4I5X6V3LYUNBMZ5YOW4BV427TH3IK4S/mailing-list
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/4EB5JPYRCTS64EA5AMV3INHDPI6I4AW7/mailing-list
https://nvd.nist.gov/vuln/detail/CVE-2024-21501advisory
https://github.com/apostrophecms/sanitize-htmlpackage
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/4EB5JPYRCTS64EA5AMV3INHDPI6I4AW7web
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/P4I5X6V3LYUNBMZ5YOW4BV427TH3IK4Sweb

Sources

SourceRecordLicence
CVE ListCVE-2024-21501 changed 2025-02-13CVE Terms of Use
GitHub Advisory DatabaseGHSA-rm97-x556-q36h changed 2026-09-10CC-BY-4.0
NVDCVE-2024-21501 changed 2026-06-17Public domain