Cross-site Scripting (XSS)

Affecting sanitize-html package, versions <1.4.3

Report new vulnerabilities
Do your applications use this vulnerable package? Test your applications

Overview

Since the sanitize-html module trusts 'text' coming from htmlparser2, and outputs it without further escaping (because htmlparser2 does not decode entities in text before delivering it), this results in an XSS attack vector if sanitize-html ignores the img tag (according to user-configured filter rules) but passes the text intact, as it must do to keep any text in documents.

References

CVSS Score

4.3
medium severity
  • Attack Vector
    Network
  • Attack Complexity
    Low
  • Privileges Required
    None
  • User Interaction
    Required
  • Scope
    Unchanged
  • Confidentiality
    Low
  • Integrity
    None
  • Availability
    None
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N
Credit
Unknown
CVE
CVE-2016-1000237
CWE
CWE-79
Snyk ID
npm:sanitize-html:20141024
Disclosed
06 Nov, 2015
Published
06 Nov, 2015