GHSA-qhxp-v273-g94h

Suggest an improvement
Source
https://github.com/advisories/GHSA-qhxp-v273-g94h
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/09/GHSA-qhxp-v273-g94h/GHSA-qhxp-v273-g94h.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-qhxp-v273-g94h
Aliases
Published
2025-09-08T12:30:33Z
Modified
2025-09-12T20:27:20Z
Severity
  • 6.1 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N CVSS Calculator
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.

Database specific
{
    "cwe_ids":  [
        "CWE-79"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2025-09-12T20:01:43Z",
    "nvd_published_at":  "2025-09-08T10:15:33Z",
    "severity":  "MODERATE"
}
References

Affected packages

npm / sanitize-html

Package

Name
sanitize-html
View open source insights on deps.dev
Purl
pkg:npm/sanitize-html

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
2.0.0-beta

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/09/GHSA-qhxp-v273-g94h/GHSA-qhxp-v273-g94h.json"