CVE-2023-2142: Nunjucks autoescape bypass leads to cross site scripting
Vulnerability summary
CVE-2023-2142 is a medium (CVSS 6.1) vulnerability in mozilla nunjucks. EPSS estimates a 0.39% chance of exploitation in the next 30 days, higher than 34.7% of scored vulnerabilities.
Not severe (CVSS 6.1, network access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Timeline
- 26-11-2024PublishedVulnerability first disclosed.
- 27-11-2024Last modifiedVulnerability information updated.
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.
CVSS metrics
6 scores · 5 sources · 2 versions- OSV · UbuntuEcosystem advisory · calculated6.1MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- OSV · DebianEcosystem advisory · calculated6.1MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- OSV · NpmEcosystem advisory · calculated6.1MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- NVDNIST6.1MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
EPSS trend
Probability
0.39%
Chance of exploitation in the next 30 days
Percentile
35%
Versus all other CVEs
30-day change
No change 0.00 pp
From 0.39% on 04-11-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, no authentication, user interaction (CVSS vector). Other conditions: not stated in public data.
Debian1 product
- node-nunjucksAll versions (No fix recorded) | < 3.2.4+~cs4.2.7-1
Mozilla1 product
- nunjucks< 3.2.4
Npm1 product
- nunjucks< 3.2.4
Ubuntu1 product
- node-nunjucksAll versions (No fix recorded)
4 vendors · 4 products
References
10 links- github.com/mozilla/nunjucksPACKAGE