sanitize-html
Affected
- introduced
0, fixed1.11.4(semver)
Fixed versions
1.11.4
Fix
- Fixed version
1.11.4npm install [email protected]
Advisory
Also known as: CVE-2017-16016
Cross-Site Scripting in sanitize-html
Affected versions of sanitize-html are vulnerable to cross-site scripting when allowedTags includes at least one nonTextTag.
Proof of Concept
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.
Medium Basis: The source's own band: MODERATE
0, fixed 1.11.4 (semver)1.11.4
1.11.4npm install [email protected]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
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0