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.
Metrics
CVSS 3.0 6.1/10
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:NWeakness enumeration
Affected software
| Vendor | Product | Versions |
|---|---|---|
| HackerOne | nunjucks node module | <=2.4.2 |
References
- https://github.com/matt-/nunjucks_testExploit, Third Party Advisory
- https://github.com/mozilla/nunjucks/issues/835Exploit, Third Party Advisory
- https://nodesecurity.io/advisories/147Exploit, Third Party Advisory
- https://github.com/matt-/nunjucks_testExploit, Third Party Advisory
- https://github.com/mozilla/nunjucks/issues/835Exploit, Third Party Advisory
- https://nodesecurity.io/advisories/147Exploit, Third Party Advisory
Timeline
- Published
- May 31, 2018
- Last modified
- Jun 17, 2026
- NVD status
- Modified