Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLWY3cGgtcDVydi1waHcy

Cross-Site Scripting in nunjucks

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.

name[]=<script>alert(1)</script>

A full PoC is available in the references section.

Recommendation

Update to version 2.4.3 or later.

Permalink: https://github.com/advisories/GHSA-f7ph-p5rv-phw2
JSON: https://advisories.ecosyste.ms/api/v1/advisories/MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLWY3cGgtcDVydi1waHcy
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Moderate
Classification: General
Published: over 5 years ago
Updated: over 1 year ago


Identifiers: GHSA-f7ph-p5rv-phw2, CVE-2016-10547
References: Repository: https://github.com/mozilla/nunjucks
Blast Radius: 0.0

Affected Packages

npm:nunjucks
Dependent packages: 2,944
Dependent repositories: 68,715
Downloads: 2,881,120 last month
Affected Version Ranges: < 2.4.3
Fixed in: 2.4.3
All affected versions: 0.1.0, 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.1.5, 0.1.6, 0.1.7, 0.1.8, 0.1.9, 0.1.10, 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.0.6, 1.0.7, 1.1.0, 1.2.0, 1.3.0, 1.3.1, 1.3.3, 1.3.4, 2.0.0, 2.1.0, 2.2.0, 2.3.0, 2.4.0, 2.4.1, 2.4.2
All unaffected versions: 2.4.3, 2.5.0, 2.5.1, 2.5.2, 3.0.0, 3.0.1, 3.1.0, 3.1.2, 3.1.3, 3.1.4, 3.1.6, 3.1.7, 3.2.0, 3.2.1, 3.2.2, 3.2.3, 3.2.4