PatchSiren cyber security CVE debrief
CVE-2026-133772 Twig CVE debrief
CVE-2026-133772 is a low-severity vulnerability in the Twig templating engine's handling of the `guard` tag. A sandboxed template could bypass the allow-list via the branch of a `guard` tag that isn't selected, potentially allowing for unintended template extensions, block imports, or macro definitions. The vulnerability occurs when a `guard` tag is used, and only one of its branches is compiled based on the existence of a callable. However, the other branch is still parsed, allowing it to register effects on the template, such as extends, use, macro, and block tags. These registrations occur even though the sandbox does not see these tags because the branch is not compiled. Defe
- Vendor
- Twig
- Product
- twig/twig
- CVSS
- LOW 2.3
- CISA KEV
- Not listed in stored evidence
- Original CVE published
- 2026-11-24
- Original CVE updated
- 2026-11-24
- Advisory published
- 2026-11-24
- Advisory updated
- 2026-11-24
Who should care
Defenders responsible for systems using Twig templates, especially those allowing templates from untrusted sources, should assess exposure and verify patched versions. This includes operators, platform administrators, vulnerability management teams, and security teams who need to understand the potential impact of this vulnerability on their environments.
Why it matters
CVE-2026-133772 is a low-severity vulnerability in the Twig templating engine that could allow sandboxed templates to bypass the allow-list via unselected `guard` tag branches. Defenders should verify the presence of patched versions and restrict template loading to trusted sources.
- Potential for unintended template extensions.
- Possible import of blocks from untrusted sources.
- Risk of defining macros in sandboxed templates.
- Verification of patched versions is required.
Technical summary
The vulnerability occurs in the Twig templating engine's handling of the `guard` tag. When a `guard` tag is used, only one of its branches is compiled based on the existence of a callable. However, the other branch is still parsed, allowing it to register effects on the template, such as extends, use, macro, and block tags. These registrations occur even though the sandbox does not see these tags because the branch is not compiled. This could allow a sandboxed template to extend a template, import blocks, or define macros, even if the policy does not allow these tags.
Defensive priority
Defenders should prioritize verifying the presence of patched versions in their environments, especially for systems using Twig templates from untrusted sources.
Recommended defensive actions
- Verify the version of Twig is 3.31.0 or later in your environment.
- Restrict template loading to trusted sources.
- Monitor for unusual template or macro definitions.
- Review compensating controls for exposed systems while remediation is scheduled and verified.
- Check relevant monitoring, detection, and logs for exposed assets that need extra review.
- Track exceptions, retest remediated assets, and close the item only after evidence is documented.
- Confirm whether affected product deployments exist in managed environments and assign an owner for follow-up.
Evidence notes
The CVE record and source item provide details on the vulnerability, but the impact and affected versions require verification from official sources. The vulnerability is in the Twig templating engine's handling of the `guard` tag. Official sources, such as the CVE Program and NIST NVD, provide additional information on the vulnerability. However, the scope of affected systems and versions requires further verification. Defenders should verify patched versions and restrict template loading to trusted sources.
Sources and references
Verified primary and authoritative sources
-
CVE-2026-133772 CVE Program record
Publisher, destination, and source semantics verified
URL: https://www.cve.org/CVERecord?id=CVE-2026-133772
CVE Program - Official CVE Program record with source-provided CVE metadata.
-
CVE-2026-133772 NVD vulnerability detail
Publisher, destination, and source semantics verified
URL: https://nvd.nist.gov/vuln/detail/CVE-2026-133772
NIST National Vulnerability Database - Official NIST NVD detail page and source-specific vulnerability assessment.
Supplemental references
-
Sandbox Tag Allow-List Bypass via the Branch of a `guard` Tag That Isn't Selected
Unverified legacy reference
URL: https://raw.githubusercontent.com/CVEProject/cvelistV5/main/cves/2026/133xxx/CVE-2026-133772.json
cve_program_cvelist_v5
-
Source reference
Unverified legacy reference
URL: https://symfony.com/cve-2026-133772
Supplemental source - vendor-advisory
-
Source reference
Unverified legacy reference
URL: https://github.com/twigphp/Twig/security/advisories/GHSA-qr49-4294-4gmw
Supplemental source - vendor-advisory
-
Source reference
Unverified legacy reference
URL: https://github.com/twigphp/Twig/commit/d5011f4654042f03d8986b5b3ba12a4d85f976f8
Supplemental source - patch
Methodology and review provenance
AI-assisted synthesis based on stored public vulnerability evidence. System validation, approval state, and publication status do not by themselves establish human review of this revision. PatchSiren helps prioritize defensive review and does not prove exposure or remediation on any system.