Cross-site scripting via complex string expressions
Published Jan 4, 2022 · Updated Apr 23, 2025
Sandbox escape in affected Nette Foundation Latte 2.8, 2.9, and 2.10 releases allows remote attackers to inject script into generated pages. PhpWriter validateTokens accepts complex variable interpolation in double-quoted strings while a sandbox policy is active, so crafted template expressions pass compilation and reach generated output. Exploitation requires an application to enable the sandbox, accept an untrusted template, and serve its rendered page to a victim; the resulting script executes in that victim’s browser context.
Summary
What happened
Sandbox escape in affected Nette Foundation Latte 2.8, 2.9, and 2.10 releases allows remote attackers to inject script into generated pages. PhpWriter validateTokens accepts complex variable interpolation in double-quoted strings while a sandbox policy is active, so crafted template expressions pass compilation and reach generated output. Exploitation requires an application to enable the sandbox, accept an untrusted template, and serve its rendered page to a victim; the resulting script executes in that victim’s browser context.
The record
- CVE
- CVE-2022-21648
- Published
- Jan 4, 2022
- Updated
- Apr 23, 2025
- Vendor
- Nette Foundation
- Product
- Latte
- Classifications
- CWE-790, CWE-79, T1059.007
- Attack vector
- network
- Privileges
- unauthenticated
Timeline
How it unfolded
- Jan 4, 2022CVE publishedPublication date reported by the CVE source.
- Apr 23, 2025Record 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=>= 2.10.0, < 2.10.8
- Affected versionversion=>= 2.8.0, < 2.8.8
- Affected versionversion=>= 2.9.0, < 2.9.6
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
No public exploit references are available in this record.
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