CVE-2026-133772
published low CVSS 4.0 · 2.3Sandbox Tag Allow-List Bypass via the Branch of a `guard` Tag That Isn't Selected
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Twig | — | twig/twig3.15.0 to < 3.31.0 · Other versions: unaffected | Affected | Not stated | 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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 2.3 / 10
- Severity
- low
- Provider
- Symfony · cna
- Vector string
- 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
- Scenarios
- en: GENERAL
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Twig | twig/twig | 3.15.0 to < 3.31.0 (affected · semver)Default: unaffected | Symfony · cna |
Weaknesses
1- CWE-863 CWE-863 Incorrect Authorization
References
3- https://github.com/twigphp/Twig/commit/d5011f4654042f03d8986b5b3ba12a4d85f976f8
- GHSA-qr49-4294-4gmw https://github.com/twigphp/Twig/security/advisories/GHSA-qr49-4294-4gmw
- CVE-2026-133772 https://symfony.com/cve-2026-133772
Provider assertions
2Symfony · cna
Sandbox Tag Allow-List Bypass via the Branch of a `guard` Tag That Isn't Selected
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- b06395cd102381f50dbf0a74c62d54a21d23ea5a3b0fa8bcd7e3f42990f867e6
- Ingested
- 01 Dec 2026, 19:45:57 UTC
- Source record
- Official CVE record