Advisory

GHSA-qhxp-v273-g94h

Also known as: CVE-2019-25225

Summary

sanitize-html is vulnerable to XSS through incomprehensive sanitization

Details

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.

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2025-09-08 12:30 UTC
Modified
2025-09-12 20:27 UTC

Affected packages and fixes

sanitize-html

npm · All systems

Affected

  • introduced 0, fixed 2.0.0-beta (semver)

Fixed versions

2.0.0-beta

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences