NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · npm

CVE-2019-25225: sanitize-html is vulnerable to XSS through incomprehensive sanitization

mediumCVSS 3.1 6.1GHSA-qhxp-v273-g94h

sanitize-html prior to version 2.0.0-beta is vulnerable to Cross-site Scripting (XSS). The sanitizeHtml() function in index.js does not sanitize content when using the custom transformTags option, which is intended to convert attribute values into text. As a result, malicious input can be transformed into executable code.

Published Sep 8, 2025 · Updated Sep 12, 2025

Affected packages

sanitize-html

Ecosystem
npm
Affected
< 2.0.0-beta
Fixed in
2.0.0-beta
Check
npm ls sanitize-html

Advisory details

From the GitHub Advisory Database (CC BY 4.0).

sanitize-html prior to version 2.0.0-beta is vulnerable to Cross-site Scripting (XSS). The sanitizeHtml() function in index.js does not sanitize content when using the custom transformTags option, which is intended to convert attribute values into text. As a result, malicious input can be transformed into executable code.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology

More npm vulnerabilities

All npm entries