GHSA-f7ph-p5rv-phw2

    Dashboard / Vulnerabilities / GHSA-f7ph-p5rv-phw2

    GHSA-f7ph-p5rv-phw2

    Published: 6 Nov 2018Last Modified: 8 Nov 2023

    Summary: Cross-Site Scripting in nunjucks

    Details: Affected versions of `nunjucks` do not properly escape specially structured user input in template vars when in auto-escape mode, resulting in a cross-site scripting vulnerability. ## Proof of Concept By using an array for the keys in a template var, escaping is bypassed. ```javascript name[]=<script>alert(1)</script> ``` A full PoC is available in the references section. ## Recommendation Update to version 2.4.3 or later.

    Affected packages

    Package

    Name: nunjucks

    Purl: pkg:npm/nunjucks

    Affected ranges

    Type: SEMVER

    Events:

    Introduced- 0
    Fixed -2.4.3

    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
    GHSA-f7ph-p5rv-phw2 | CVE-DB