# CVE-2026-133766: Sandbox `__toString()` policy bypass via spread arguments

- Severity: Low 2.3 (CVSS:4.0, scored by Symfony) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.53%, higher than 46% of CVEs (2026-12-01)
- Published: 2026-11-24T13:07:49.491Z
- Modified: 2026-12-01T20:18:25.380Z
- Weaknesses: CWE-693, CWE-863
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: 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.

(As written by CVE List.)

## Affected

- twig/twig: from 3.28.0 before 3.31.1

## References

- <https://symfony.com/cve-2026-133766> (vendor-advisory)
- <https://github.com/twigphp/Twig/security/advisories/GHSA-56wp-8m9q-4354> (vendor-advisory)
- <https://github.com/twigphp/Twig/commit/7af821c372f52cc9447afeba9e042de44b738222> (patch)

## Sources

- CVE List: [CVE-2026-133766](https://www.cve.org/CVERecord?id=CVE-2026-133766), CVE Terms of Use, modified 2026-12-01
- NVD: [CVE-2026-133766](https://nvd.nist.gov/vuln/detail/CVE-2026-133766), Public domain, modified 2026-12-01

---

Page: https://cve.day/CVE-2026-133766 · Whole record: https://cve.day/CVE-2026-133766.json · Rebuilt by cve.day 2026-12-01T20:32:22.572Z
