CVE-2026-133772Sandbox Tag Allow-List Bypass via the Branch of a `guard` Tag That Isn't Selected
The guard tag compiles only one of its branches, depending on whether a callable exists. The other branch was still parsed, though. The extends, use, macro and block tags in it registered their effects on the template. The sandbox doesn't see these tags, since that branch isn't compiled. A sandboxed template allowed to use guard could therefore extend a template, import blocks and define macros, while the policy doesn't allow these tags: {% guard filter upper %}{% else %}{% extends "parent.html" %}{% endguard %} The templates reached this way come from the loader of the sandbox, and they are sandboxed too. What the branch that isn't selected registers on the parser is now discarded.
What to do
Debian has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Debian 14 | php-twig | Fix pending | DEBIAN-CVE-2026-133772 | |
| Debian 13 | php-twig | Fix pending | DEBIAN-CVE-2026-133772 | |
| Debian 12 | php-twig | Fix pending | DEBIAN-CVE-2026-133772 |
What the vendor says
As published in the CVE record by Symfony, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- twig/twig: affected: 3.15.0 to before 3.31.0; fixed in
3.31.0
Vendor advisories:
- https://symfony.com/cve-2026-133772 (vendor-advisory)
- https://github.com/twigphp/Twig/security/advisories/GHSA-qr49-4294-4gmw (vendor-advisory)
- https://github.com/twigphp/Twig/commit/d5011f4654042f03d8986b5b3ba12a4d85f976f8 (patch)
References
- https://symfony.com/cve-2026-133772
- https://github.com/twigphp/Twig/security/advisories/GHSA-qr49-4294-4gmw
- https://github.com/twigphp/Twig/commit/d5011f4654042f03d8986b5b3ba12a4d85f976f8
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.