# CVE-2026-133772: Sandbox Tag Allow-List Bypass via the Branch of a `guard` Tag That Isn't Selected

- Severity: Low 2.3 (CVSS:4.0, scored by Symfony) `CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.53%, higher than 46% of CVEs (2026-12-01)
- Published: 2026-11-24T13:07:54.995Z
- Modified: 2026-12-01T20:18:26.147Z
- Weaknesses: CWE-863
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Symfony

## Description

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.

(As written by CVE List.)

## Affected

- twig/twig: from 3.15.0 before 3.31.0

## References

- <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)

## Sources

- CVE List: [CVE-2026-133772](https://www.cve.org/CVERecord?id=CVE-2026-133772), CVE Terms of Use, modified 2026-12-01
- NVD: [CVE-2026-133772](https://nvd.nist.gov/vuln/detail/CVE-2026-133772), Public domain, modified 2026-12-01

---

Page: https://cve.day/CVE-2026-133772 · Whole record: https://cve.day/CVE-2026-133772.json · Rebuilt by cve.day 2026-12-01T20:32:18.569Z
