CVE-2023-2142
MEDIUM 6.1CVSS 3.1Nunjucks autoescape bypass leads to cross site scripting
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.
- Published
- 26 Nov 2024
- Last modified
- 17 Jun 2026
- Assigned by
- security@mozilla.org
- NVD status
- Analyzed
- Weakness
- CWE-79
- Also known as
- GHSA-x77j-w7wf-fjmw
- Sources
- NVDJSONOSV GHSA-x77j-w7wf-fjmwJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| OSV | GitHub | CVSS 4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N | |
| NVD | 134c704f-9b21-4f2e-91b3-4a467353bcc0 (Secondary) | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | mozilla | nunjuckscpe:2.3:a:mozilla:nunjucks:*:*:*:*:*:*:*:* |
< 3.2.4 | 3.2.4 |
| OSV | npm | nunjucks | < 3.2.4 | 3.2.4 |
References
- https://bugzilla.mozilla.org/show_bug.cgi?id=1825980 · Issue Tracking, Permissions Required, WEB
- https://github.com/mozilla/nunjucks/security/advisories/GHSA-x77j-w7wf-fjmw · Vendor Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2023-2142 · ADVISORY
- https://github.com/mozilla/nunjucks/pull/1437 · WEB
- https://github.com/mozilla/nunjucks/commit/ec16d210e7e13f862eccdb0bc9af9f60ff6749d6 · WEB
- https://github.com/mozilla/nunjucks · PACKAGE
- https://github.com/mozilla/nunjucks/releases/tag/v3.2.4 · WEB
History
- 25 Nov 2026 20:56 UTC · NVD: first stored (published 26 Nov 2024)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 20 Apr 2023)