{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-133764","assignerOrgId":"b5aa5c7f-767d-4597-9c64-3ac08b8711c6","state":"PUBLISHED","assignerShortName":"Symfony","dateReserved":"2026-11-20T14:01:43.158Z","datePublished":"2026-11-24T13:07:47.621Z","dateUpdated":"2026-11-24T13:07:47.621Z"},"containers":{"cna":{"providerMetadata":{"orgId":"b5aa5c7f-767d-4597-9c64-3ac08b8711c6","shortName":"Symfony","dateUpdated":"2026-11-24T13:07:47.621Z"},"title":"Sandbox `__toString()` policy bypass via the input of custom tests","datePublic":"2026-11-24T12:58:30.000Z","descriptions":[{"lang":"en","value":"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.","supportingMedia":[{"type":"text/markdown","base64":false,"value":"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```twig\n{{ obj is upperish }}\n```\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."}]}],"affected":[{"vendor":"Twig","product":"twig/twig","collectionURL":"https://packagist.org","packageName":"twig/twig","repo":"https://github.com/twigphp/Twig","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"3.31.1","versionType":"semver"}]}],"problemTypes":[{"descriptions":[{"lang":"en","cweId":"CWE-693","description":"CWE-693 Protection Mechanism Failure","type":"CWE"}]},{"descriptions":[{"lang":"en","cweId":"CWE-863","description":"CWE-863 Incorrect Authorization","type":"CWE"}]}],"metrics":[{"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}],"cvssV4_0":{"version":"4.0","vectorString":"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","baseScore":2.3,"baseSeverity":"LOW"}}],"references":[{"url":"https://symfony.com/cve-2026-133764","name":"CVE-2026-133764","tags":["vendor-advisory"]},{"url":"https://github.com/twigphp/Twig/security/advisories/GHSA-rc9g-xwx4-rmfh","name":"GHSA-rc9g-xwx4-rmfh","tags":["vendor-advisory"]},{"url":"https://github.com/twigphp/Twig/commit/978c60be74fc62a0f2c3af11ca5bc3609ae8b69a","tags":["patch"]}],"credits":[{"lang":"en","value":"Arpit Jain","type":"finder"},{"lang":"en","value":"Fabien Potencier","type":"remediation developer"}],"source":{"advisory":"GHSA-rc9g-xwx4-rmfh","discovery":"UNKNOWN"},"x_generator":{"engine":"symfony/ghsa-to-cve"}}}}