{"id":"CVE-2023-2142","summary":"Nunjucks autoescape bypass leads to cross site scripting","details":"In Nunjucks versions prior to version 3.2.4, it was \npossible to bypass the restrictions which are provided by the autoescape\n functionality. If there are two user-controlled parameters on the same \nline used in the views, it was possible to inject cross site scripting \npayloads using the backslash \\ character.","aliases":["GHSA-x77j-w7wf-fjmw"],"modified":"2026-08-12T03:51:29.588399651Z","published":"2024-11-26T11:24:15.422Z","database_specific":{"cna_assigner":"mozilla","cwe_ids":["CWE-79"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/2xxx/CVE-2023-2142.json"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/2xxx/CVE-2023-2142.json"},{"type":"ADVISORY","url":"https://github.com/mozilla/nunjucks/security/advisories/GHSA-x77j-w7wf-fjmw"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-2142"},{"type":"REPORT","url":"https://bugzilla.mozilla.org/show_bug.cgi?id=1825980"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/mozilla/nunjucks","events":[{"introduced":"0"},{"fixed":"86a77f49da4779d55414d8337e1a4d7ec7582da5"}],"database_specific":{"cpe":"cpe:2.3:a:mozilla:nunjucks:*:*:*:*:*:*:*:*","extracted_events":[{"introduced":"0"},{"fixed":"3.2.4"}],"source":["AFFECTED_FIELD","CPE_RANGE"]}}],"versions":["v3.2.3","v3.2.2","v3.2.1","v3.2.0","v3.1.7","v3.1.6","v3.1.5","v3.1.4","v3.1.3","v3.1.2","v3.1.1","v3.1.0","v3.0.1","v3.0.0","v2.2.0","v2.1.0","v2.0.0","v1.3.3","v1.3.2","v.1.3.1","v1.3.0","v1.2.0","v1.1.0","v1.0.7","v1.0.5","v1.0.4","v1.0.2","v1.0.1","v1.0.0","v0.1.9","v0.1.8","v0.1.7","v0.1.6","v0.1.5","v0.1.4","v0.1.2","v0.1.1","v0.1.0"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-2142.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"}]}