MediumGHSA-rm97-x556-q36hCVE-2024-21501

sanitize-html Information Exposure vulnerability

Published 24 Feb 2024 · Updated 10 Sept 2026

Affected package

Affected
<2.12.1
Fixed in
2.12.1
Update to the fixed version for your release line, for example:npm install sanitize-html@2.12.1

Details

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.

Is GHSA-rm97-x556-q36h in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected sanitize-html, and gives you the command that fixes it.

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.