Cross-site scripting via unescaped backslash
Published Nov 26, 2024 · Updated Nov 27, 2024
Cross-site scripting in Mozilla Nunjucks before 3.2.4 allows remote attackers to inject JavaScript through autoescaped template values. The escape routine omitted backslashes from its replacement map and regular expression, allowing one controlled value to escape a quoted JavaScript string before a second value supplied executable code. Exploitation requires two attacker-controlled parameters rendered on the same template line and user interaction with the resulting page, exposing browser-accessible data and actions.
Summary
What happened
Cross-site scripting in Mozilla Nunjucks before 3.2.4 allows remote attackers to inject JavaScript through autoescaped template values. The escape routine omitted backslashes from its replacement map and regular expression, allowing one controlled value to escape a quoted JavaScript string before a second value supplied executable code. Exploitation requires two attacker-controlled parameters rendered on the same template line and user interaction with the resulting page, exposing browser-accessible data and actions.
The record
- CVE
- CVE-2023-2142
- Published
- Nov 26, 2024
- Updated
- Nov 27, 2024
- Vendor
- Mozilla
- Product
- Nunjucks
- Classifications
- CWE-79, T1059.007
- Attack vector
- network
- Privileges
- unauthenticated
Timeline
How it unfolded
- Nov 26, 2024CVE publishedPublication date reported by the CVE source.
- Nov 27, 2024Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=0 <3.2.4
What conditions does exploitation require?
What is affected?
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- Nunjucks autoescape bypass payload exampleproof of concept · demonstrated
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo