# CVE-2023-2142: Nunjucks autoescape bypass leads to cross site scripting

- Priority: **Routine**
- Reason: Not severe (CVSS 6.1, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2024-11-26 · Modified: 2024-11-27
- Aliases: UBUNTU-CVE-2023-2142, DEBIAN-CVE-2023-2142, GHSA-x77j-w7wf-fjmw
- Record: https://cvemate.com/vulnerability/CVE-2023-2142 · JSON: https://cvemate.com/vulnerability/CVE-2023-2142/json

## Description

```text
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.
```

## Signals

- CVSS: 6.1 medium (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- EPSS: 0.386%, percentile 34.776%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- debian node-nunjucks (Debian): All versions (No fix recorded) \| \< 3.2.4+~cs4.2.7-1
- ubuntu node-nunjucks (Ubuntu): All versions (No fix recorded)
- mozilla nunjucks: \< 3.2.4
- Npm nunjucks (Npm): \< 3.2.4

## References

- <https://bugzilla.mozilla.org/show_bug.cgi?id=1825980>
- <https://github.com/mozilla/nunjucks/security/advisories/GHSA-x77j-w7wf-fjmw>
- <https://ubuntu.com/security/CVE-2023-2142>
- <https://www.cve.org/CVERecord?id=CVE-2023-2142>
- <https://security-tracker.debian.org/tracker/CVE-2023-2142>
- <https://nvd.nist.gov/vuln/detail/CVE-2023-2142>
- <https://github.com/mozilla/nunjucks/pull/1437>
- <https://github.com/mozilla/nunjucks/commit/ec16d210e7e13f862eccdb0bc9af9f60ff6749d6>
- <https://github.com/mozilla/nunjucks>
- <https://github.com/mozilla/nunjucks/releases/tag/v3.2.4>

---

Data as of 2026-12-05T06:59:48.289Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
