CVE-2026-133766
Sandbox `__toString()` policy bypass via spread arguments
Description
Since Twig 3.28.0, the sandbox skips the toString() check of an argument whose PHP parameter can't hold a string, like an int. A spread argument was mapped to a single parameter, although it fills every parameter from its position on. A sandboxed template could therefore call a denied toString() method: {{ tag(...[1, obj]) }} Here, the first parameter of tag() is an int, and a later one accepts strings. Applications are affected when they allow such a function, filter or test in the sandbox. No built-in callable is affected. A spread argument is now checked unless every parameter that it can fill has a safe type.
INFO
Published Date :
Nov. 24, 2026, 1:17 p.m.
Last Modified :
Dec. 1, 2026, 8:18 p.m.
Remotely Exploit :
No
Source :
b5aa5c7f-767d-4597-9c64-3ac08b8711c6
CVSS Scores
| Score | Version | Severity | Vector | Exploitability Score | Impact Score | Source |
|---|---|---|---|---|---|---|
| CVSS | 134c704f-9b21-4f2e-91b3-4a467353bcc0 | |||||
| CVSS 4.0 | LOW | b5aa5c7f-767d-4597-9c64-3ac08b8711c6 | ||||
| CVSS 4.0 | LOW | b5aa5c7f-767d-4597-9c64-3ac08b8711c6 |
Solution
- Update Twig to version 3.28.0 or later.
- Ensure sandbox policies are correctly configured.
- Review callable functions, filters, and tests.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2026-133766.
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2026-133766 is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2026-133766
weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2026-133766 vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2026-133766 vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0
Dec. 01, 2026
Action Type Old Value New Value Added SSVC {'id': 'CVE-2026-133766', 'role': 'CISA Coordinator', 'options': [{'exploitation': 'none'}, {'automatable': 'no'}, {'technicalImpact': 'partial'}], 'version': '2.0.3', 'timestamp': '2026-11-30T17:56:29.369669Z'} -
New CVE Received by b5aa5c7f-767d-4597-9c64-3ac08b8711c6
Nov. 24, 2026
Action Type Old Value New Value Added Description Since Twig 3.28.0, the sandbox skips the toString() check of an argument whose PHP parameter can't hold a string, like an int. A spread argument was mapped to a single parameter, although it fills every parameter from its position on. A sandboxed template could therefore call a denied toString() method: {{ tag(...[1, obj]) }} Here, the first parameter of tag() is an int, and a later one accepts strings. Applications are affected when they allow such a function, filter or test in the sandbox. No built-in callable is affected. A spread argument is now checked unless every parameter that it can fill has a safe type. Added CVSS V4.0 AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X Added CWE CWE-693 Added CWE CWE-863 Added Affected New affected value received. <a href="https://github.com/CVEProject/cvelistV5/blob/main/cves/2026/133xxx/CVE-2026-133766.json">CVE-2026-133766</a> Added Reference https://github.com/twigphp/Twig/commit/7af821c372f52cc9447afeba9e042de44b738222 Added Reference https://github.com/twigphp/Twig/security/advisories/GHSA-56wp-8m9q-4354 Added Reference https://symfony.com/cve-2026-133766