{"id":"CVE-2026-133766","aliases":["CVE-2026-133766"],"related":[],"kind":"vulnerability","state":"published","title":"Sandbox `__toString()` policy bypass via spread arguments","summary":"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:\n\n{{ tag(...[1, obj]) }}\n\nHere, 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.\n\nA spread argument is now checked unless every parameter that it can fill has a safe type.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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:\n\n{{ tag(...[1, obj]) }}\n\nHere, 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.\n\nA spread argument is now checked unless every parameter that it can fill has a safe type.","source":"cvelist"}],"published":"2026-11-24T13:07:49.491Z","modified":"2026-12-01T20:18:25.380Z","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":"3.28.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-133766","tags":["vendor-advisory"],"sources":["cvelist","nvd"]},{"url":"https://github.com/twigphp/Twig/security/advisories/GHSA-56wp-8m9q-4354","tags":["vendor-advisory"],"sources":["cvelist","nvd"]},{"url":"https://github.com/twigphp/Twig/commit/7af821c372f52cc9447afeba9e042de44b738222","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":["Jacko","Nicolas Grekas"],"assigner":"Symfony","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-11-30T17:56:29.369Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-133766","url":"https://www.cve.org/CVERecord?id=CVE-2026-133766","licence":"CVE Terms of Use","modified":"2026-12-01T19:38:31.340Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-133766","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-133766","licence":"Public domain","modified":"2026-12-01T20:18:25.380Z"}],"updatedAt":"2026-12-01T20:32:22.572Z","epss":{"score":0.00533,"percentile":0.46465,"date":"2026-12-01T12:00:22.000Z"}}