๐Ÿ” CVE Alert

CVE-2026-133766

UNKNOWN 0.0

Sandbox `__toString()` policy bypass via spread arguments

CVSS Score
0.0
EPSS Score
0.0%
EPSS Percentile
0th

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.

CWE CWE-693 CWE-863
Vendor twig
Product twig/twig
Published Nov 24, 2026
Stay Ahead of the Next One

Get instant alerts for twig twig/twig

Be the first to know when new unknown vulnerabilities affecting twig twig/twig are published โ€” delivered to Slack, Telegram or Discord.

Get Free Alerts โ†’ Free ยท No credit card ยท 60 sec setup

Affected Versions

Twig / twig/twig
3.28.0 < 3.31.1

References

NVD โ†— CVE.org โ†— EPSS Data โ†—
symfony.com: https://symfony.com/cve-2026-133766 github.com: https://github.com/twigphp/Twig/security/advisories/GHSA-56wp-8m9q-4354 github.com: https://github.com/twigphp/Twig/commit/7af821c372f52cc9447afeba9e042de44b738222

Credits

Jacko Nicolas Grekas