GHSA-xc6g-ggrc-qq4r
Dashboard / Vulnerabilities / GHSA-xc6g-ggrc-qq4r
Summary: Cross-Site Scripting in sanitize-html
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.
References: https://nvd.nist.gov/vuln/detail/CVE-2017-16016, https://github.com/punkave/sanitize-html/issues/100, https://github.com/punkave/sanitize-html/commit/5d205a1005ba0df80e21d8c64a15bb3accdb2403, https://github.com/punkave/sanitize-html/commit/5d205a1005ba0df80e21d8c64a15bb3accdb2403))), https://github.com/advisories/GHSA-xc6g-ggrc-qq4r, https://npmjs.com/package/sanitize-html#discarding-the-entire-contents-of-a-disallowed-tag, https://www.npmjs.com/advisories/154
Affected packages
Package
Name: sanitize-html
Purl: pkg:npm/sanitize-html
Affected ranges
Type: SEMVER
Events:
