What’s Vulnerable › Vulnerabilities
CVE-2023-2142: Nunjucks autoescape bypass leads to cross site scripting
- Severity: medium (CVSS 6.1 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.4% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2024-11-26 · updated 2026-06-17
- Weakness: CWE-79
Description
In Nunjucks versions prior to version 3.2.4, it was possible to bypass the restrictions which are provided by the autoescape functionality. If there are two user-controlled parameters on the same line used in the views, it was possible to inject cross site scripting payloads using the backslash \ character.
Affected products
- Mozilla Nunjucks: before 3.2.4 — fixed in 3.2.4
How to fix
Upgrade to a fixed version: Mozilla Nunjucks 3.2.4. Check the vendor advisory for mitigations.
References
- https://bugzilla.mozilla.org/show_bug.cgi?id=1825980
- https://github.com/mozilla/nunjucks/security/advisories/GHSA-x77j-w7wf-fjmw
Get alerted when CVE-2023-2142 or the next vulnerability affects your stack