CVE-2023-2142

Nunjucks autoescape bypass leads to cross site scripting

Published Nov 26, 2024 CVSS 3.1 · 6.1 Medium EPSS < 1% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-x77j-w7wf-fjmw Nunjucks autoescape bypass leads to cross site scripting
History
Type Values Removed Values Added
First Time appeared Mozilla
Mozilla nunjucks
CPEs cpe:2.3:a:mozilla:nunjucks:*:*:*:*:*:*:*:*
Vendors & Products Mozilla
Mozilla nunjucks
Metrics cvssV3_1

{'score': 5.4, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N'}

ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

cvssV3_1

{'score': 6.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N'}

Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

{'score': 5.4, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N'}

threat_severity

Moderate

Type Values Removed Values Added
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.
Title Nunjucks autoescape bypass leads to cross site scripting
Weaknesses CWE-79
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
mozilla
Published
Updated
Nov 27, 2024, 4:19 PM
Reserved
Apr 18, 2023, 8:19 AM
Status
Analyzed
Published
Nov 26, 2024, 12:15 PM
Modified
Jun 17, 2026, 5:51 AM
Severity
Moderate
Public date
Nov 26, 2024, 11:24 AM