CVE-2023-2142Mozilla Nunjucks
Medium 6.1 No auth needed
Follow: this CVE · Mozilla · Mozilla Nunjucks We alert you by email or Slack (account required).
- Priority
- 52
- CVSS 3.1
- 6.1
- EPSS
- 0.5% probability of exploitation in 30 days · percentile 32
- Auth required
- No
- Published
- Nov 26, 2024
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-79
- SSVC (CISA)
- Exploitation: proof of concept · Automatable: no · Technical impact: partial
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
What happens
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.
What to do
- Apply the vendor's security update for Nunjucks.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| npm | nunjucks |
< 3.2.4 |
3.2.4 |
npm install nunjucks@3.2.4 |
Per OSV / GitHub Advisories (GHSA-x77j-w7wf-fjmw). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| mozilla | nunjucks | < 3.2.4 |
Official sources
References
Links published by the sources. Open them with care.
- bugzilla.mozilla.org Issue Tracking Permissions Required
- github.com Vendor Advisory