Kurz gesagt
- CVE-2016-10547 ist eine Schwachstelle (MITTEL (CVSS 6.1)) in nunjucks (mozilla), nunjucks.
- Wahrscheinlichkeit einer Ausnutzung in den nächsten 30 Tagen (EPSS): 1.4%, höher als bei 72.9% aller Schwachstellen.
- Abhilfe: auf 2.4.3 oder neuer aktualisieren.
| Package | Affected versions | Patched versions |
|---|
| nunjucks | ≤ 2.4.2
| No fix yet |
| nunjucks npm | < 2.4.3
| 2.4.3
|
Description
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.
NVD description
Nunjucks is a full featured templating engine for JavaScript. Versions 2.4.2 and lower have a cross site scripting (XSS) vulnerability in autoescape mode. In autoescape mode, all template vars should automatically be escaped. By using an array for the keys, such as `name[]=<script>alert(1)</script>`, it is possible to bypass autoescaping and inject content into the DOM.
Running one of these products? Scan your site to see whether it exposes a vulnerable version.
Scan my site free