CVE-2026-133766
published low CVSS 4.0 · 2.3Sandbox `__toString()` policy bypass via spread arguments
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Twig | — | twig/twig3.28.0 to < 3.31.1 · Other versions: unaffected | Affected | Not stated | Symfony |
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.
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.28.0 to < 3.31.1 (affected · semver)Default: unaffected | Symfony · cna |
Weaknesses
2- CWE-693 CWE-693 Protection Mechanism Failure
- CWE-863 CWE-863 Incorrect Authorization
References
3- https://github.com/twigphp/Twig/commit/7af821c372f52cc9447afeba9e042de44b738222
- GHSA-56wp-8m9q-4354 https://github.com/twigphp/Twig/security/advisories/GHSA-56wp-8m9q-4354
- CVE-2026-133766 https://symfony.com/cve-2026-133766
Provider assertions
2Symfony · cna
Sandbox `__toString()` policy bypass via spread arguments
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- f10e08c6cc772b9790dffdef1477dba648b07236142b352b07dacf29d63f6fde
- Ingested
- 01 Dec 2026, 19:45:57 UTC
- Source record
- Official CVE record