sanitize-html is vulnerable to XSS through incomprehensive sanitization
Moderate severity
GitHub Reviewed
Published
Sep 8, 2025
to the GitHub Advisory Database
•
Updated Sep 12, 2025
Description
Published by the National Vulnerability Database
Sep 8, 2025
Published to the GitHub Advisory Database
Sep 8, 2025
Reviewed
Sep 12, 2025
Last updated
Sep 12, 2025
sanitize-html
prior to version 2.0.0-beta is vulnerable to Cross-site Scripting (XSS). ThesanitizeHtml()
function inindex.js
does not sanitize content when using the customtransformTags
option, which is intended to convert attribute values into text. As a result, malicious input can be transformed into executable code.References