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 ```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.
beschreibt (1)
Zugehörige CVEs.
| ID | Schweregrad | ausnutzbar | ||
|---|---|---|---|---|
| CVE-2017-16016US | medium6.1 | — | ||
Sanitize-html is a library for scrubbing html input of malicious values. Versions 1.11.1 and below are vulnerable to cross site scripting (XSS) in certain scenarios: If allowed at… | ||||
Referenzen
Externe Belege — Patches, Meldungen, Analysen.
- https://github.com/advisories/GHSA-xc6g-ggrc-qq4rADVISORY
- https://github.com/punkave/sanitize-html/commit/5d205a1005ba0df80e21d8c64a15bb3accdb2403WEB
- https://github.com/punkave/sanitize-html/commit/5d205a1005ba0df80e21d8c64a15bb3accdb2403)))WEB
- https://github.com/punkave/sanitize-html/issues/100WEB
- https://npmjs.com/package/sanitize-html#discarding-the-entire-contents-of-a-disallowed-tagWEB
- https://nvd.nist.gov/vuln/detail/CVE-2017-16016ADVISORY
- https://www.npmjs.com/advisories/154WEB
Advisories wie diese benennen die exponierten Produkte, die Angreifer auf Ihrer Angriffsfläche ins Visier nehmen. Sehen Sie mit einem kostenlosen Passiv-Scan, was exponiert ist.
Kostenloser Scan