CVE-2022-21648 is a high-severity (CVSS 8.2) Cross-site Scripting (XSS) vulnerability in latte/latte. A fix is available for latte/latte — see the affected versions and patch details below.
Sandbox bypass in Latte templates
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
CVE-2022-21648 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 385,386 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
latte/latte🐘latte/latte🐘latte/latteReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.
Description
Latte is an open source template engine for PHP. Versions since 2.8.0 Latte has included a template sandbox and in affected versions it has been found that a sandbox escape exists allowing for injection into web pages generated from Latte. This may lead to XSS attacks. The issue is fixed in the versions 2.8.8, 2.9.6 and 2.10.8. Users unable to upgrade should not accept template input from untrusted sources.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐘Packagist | latte/latte | ≥ 2.10.0&&< 2.10.8 | 2.10.8composer require latte/latte:^2.10.8 |
| 🐘Packagist | latte/latte | ≥ 2.9.0&&< 2.9.6 | 2.9.6composer require latte/latte:^2.9.6 |
| 🐘Packagist | latte/latte | ≥ 2.8.0&&< 2.8.8 | 2.8.8composer require latte/latte:^2.8.8 |
Affected Products
lattenetteDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for latte/latte, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update latte/latte to 2.10.8 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2022-21648 is resolved across your whole dependency graph.
Workarounds
Escape or sanitise the affected output on the server side rather than relying on client-side filtering, and add a Content-Security-Policy that blocks inline script execution so injected markup cannot run even if it reaches the page.
Frequently Asked Questions
Is CVE-2022-21648 in your dependencies?
Find it across Packagist, including transitive dependencies.