๐Ÿ” CVE Alert

CVE-2026-133772

UNKNOWN 0.0

Sandbox Tag Allow-List Bypass via the Branch of a `guard` Tag That Isn't Selected

CVSS Score
0.0
EPSS Score
0.0%
EPSS Percentile
0th

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.

CWE CWE-863
Vendor twig
Product twig/twig
Published Nov 24, 2026
Stay Ahead of the Next One

Get instant alerts for twig twig/twig

Be the first to know when new unknown vulnerabilities affecting twig twig/twig are published โ€” delivered to Slack, Telegram or Discord.

Get Free Alerts โ†’ Free ยท No credit card ยท 60 sec setup

Affected Versions

Twig / twig/twig
3.15.0 < 3.31.0

References

NVD โ†— CVE.org โ†— EPSS Data โ†—
symfony.com: https://symfony.com/cve-2026-133772 github.com: https://github.com/twigphp/Twig/security/advisories/GHSA-qr49-4294-4gmw github.com: https://github.com/twigphp/Twig/commit/d5011f4654042f03d8986b5b3ba12a4d85f976f8

Credits

Fabien Potencier