{"id":"CVE-2026-133764","aliases":["CVE-2026-133764"],"related":[],"kind":"vulnerability","state":"published","title":"Sandbox `__toString()` policy bypass via the input of custom tests","summary":"The sandbox checks that a template may call toString() on an object before converting it to a string. It didn't check the input of tests. The PHP callable of a test may convert this input to a string, for example when its parameter is typed as string. PHP then calls toString() on an object without the sandbox checking it first:\n\n{{ obj is upperish }}\n\nApplications are affected when they register such a test and allow it in the sandbox. No built-in test is affected.\n\nThe sandbox now checks the input of tests like the input of filters. The built-in tests that never convert their input to a string still skip the check.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"The sandbox checks that a template may call toString() on an object before converting it to a string. It didn't check the input of tests. The PHP callable of a test may convert this input to a string, for example when its parameter is typed as string. PHP then calls toString() on an object without the sandbox checking it first:\n\n{{ obj is upperish }}\n\nApplications are affected when they register such a test and allow it in the sandbox. No built-in test is affected.\n\nThe sandbox now checks the input of tests like the input of filters. The built-in tests that never convert their input to a string still skip the check.","source":"cvelist"}],"published":"2026-11-24T13:07:47.621Z","modified":"2026-12-01T20:18:25.113Z","severity":{"scorer":"Symfony","scheme":"CVSS:4.0","vector":"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","score":2.3,"rating":"LOW"},"severities":[{"scorer":"Symfony","scheme":"CVSS:4.0","vector":"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","score":2.3,"rating":"LOW"}],"cwes":["CWE-693","CWE-863"],"affected":[{"ranges":[{"type":"semver","introduced":"0","fixed":"3.31.1","status":"affected"}],"vendor":"Twig","product":"twig/twig","package":"twig/twig","repo":"https://github.com/twigphp/Twig","source":"cvelist"}],"references":[{"url":"https://symfony.com/cve-2026-133764","tags":["vendor-advisory"],"sources":["cvelist","nvd"]},{"url":"https://github.com/twigphp/Twig/security/advisories/GHSA-rc9g-xwx4-rmfh","tags":["vendor-advisory"],"sources":["cvelist","nvd"]},{"url":"https://github.com/twigphp/Twig/commit/978c60be74fc62a0f2c3af11ca5bc3609ae8b69a","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":["Arpit Jain","Fabien Potencier"],"assigner":"Symfony","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-11-30T17:56:14.327Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-133764","url":"https://www.cve.org/CVERecord?id=CVE-2026-133764","licence":"CVE Terms of Use","modified":"2026-12-01T19:38:31.708Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-133764","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-133764","licence":"Public domain","modified":"2026-12-01T20:18:25.113Z"}],"updatedAt":"2026-12-01T20:32:30.469Z","epss":{"score":0.00533,"percentile":0.46465,"date":"2026-12-01T12:00:22.000Z"}}