PatchSiren cyber security CVE debrief
CVE-2026-133766 Twig CVE debrief
A sandbox bypass vulnerability exists in Twig, a templating engine for PHP, versions 3.28.0 up to but not including 3.31.1. The issue arises from the handling of spread arguments in sandboxed templates, allowing a template to call a denied __toString() method. This could potentially lead to security issues if an application uses affected versions of Twig and allows certain functions, filters, or tests in the sandbox.
- 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 applications using Twig, especially those allowing sandbox usage, should assess exposure and prioritize verification and mitigation. This includes operators, platform administrators, vulnerability management teams, and security teams who need to verify Twig version and restrict sandbox usage to necessary functions, filters, and tests.
Why it matters
Defenders should prioritize verifying their Twig version and restricting sandbox usage to mitigate potential risks associated with this sandbox bypass vulnerability.
- Potential security issues due to sandbox bypass
- Need to verify Twig version and restrict sandbox usage
- Possible impact on applications allowing certain functions, filters, or tests in the sandbox
Technical summary
The vulnerability exists due to the handling of spread arguments in sandboxed templates, allowing a template to call a denied __toString() method. This could potentially lead to security issues if an application uses affected versions of Twig and allows certain functions, filters, or tests in the sandbox. Affected product context includes Twig versions 3.28.0 up to but not including 3.31.1. Defenders should prioritize verifying their Twig version and restricting sandbox usage to mitigate potential risks associated with this sandbox bypass vulnerability.
Defensive priority
Defenders should prioritize verifying their Twig version and restricting sandbox usage to mitigate potential risks.
Recommended defensive actions
- Verify Twig version and ensure it is 3.31.1 or later
- Restrict sandbox usage to necessary functions, filters, and tests
- Monitor for potential security issues related to this vulnerability
- 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, its impact, and affected versions of Twig. However, there is limited information on exploitation or specific attacks. Defenders should verify Twig version and restrict sandbox usage. Limited source detail requires explicit evidence-limit language and defensive verification tasks.
Sources and references
Verified primary and authoritative sources
-
CVE-2026-133766 CVE Program record
Publisher, destination, and source semantics verified
URL: https://www.cve.org/CVERecord?id=CVE-2026-133766
CVE Program - Official CVE Program record with source-provided CVE metadata.
-
CVE-2026-133766 NVD vulnerability detail
Publisher, destination, and source semantics verified
URL: https://nvd.nist.gov/vuln/detail/CVE-2026-133766
NIST National Vulnerability Database - Official NIST NVD detail page and source-specific vulnerability assessment.
Supplemental references
-
Sandbox `__toString()` policy bypass via spread arguments
Unverified legacy reference
URL: https://raw.githubusercontent.com/CVEProject/cvelistV5/main/cves/2026/133xxx/CVE-2026-133766.json
cve_program_cvelist_v5
-
Source reference
Unverified legacy reference
URL: https://symfony.com/cve-2026-133766
Supplemental source - vendor-advisory
-
Source reference
Unverified legacy reference
URL: https://github.com/twigphp/Twig/security/advisories/GHSA-56wp-8m9q-4354
Supplemental source - vendor-advisory
-
Source reference
Unverified legacy reference
URL: https://github.com/twigphp/Twig/commit/7af821c372f52cc9447afeba9e042de44b738222
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.