{"id":"CVE-2024-51755","aliases":["GHSA-jjxq-ff2g-95vh"],"url":"https://o3.security/vulnerability/CVE-2024-51755","summary":"Unguarded calls to __isset() and to array-accesses when the sandbox is enabled in Twig","details":"### Description\n\nIn a sandbox, and attacker can access attributes of Array-like objects as they were not checked by the security policy.\nThey are now checked via the property policy and the `__isset()` method is now called after the security check.\n**This is a BC break.**\n\n### Resolution\n\nThe sandbox mode now ensures access to array-like's properties is allowed.\n\nThe patch for this issue is available [here](https://github.com/twigphp/Twig/commit/ec39a9dccc5fb4eaaba55e5d79a6f84a8dd8b69d) for the 3.11.x branch, and [here](https://github.com/twigphp/Twig/commit/b957e5a44cc0075d04ccff52f8fa9d8e6db3e3a0) for the 3.x branch.\n\n### Credits\n\nWe would like to thank Jamie Schouten for reporting the issue and Nicolas Grekas for providing the fix.\n","published":"2024-11-06T19:27:05.347Z","modified":"2026-08-12T03:51:48.789087591Z","cvss":{"score":2.2,"severity":"LOW","vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:L/I:N/A:N"},"epss":{"score":0.00429,"percentile":0.36509,"asOf":"2026-09-16"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"Packagist","name":"twig/twig","fixedVersion":"3.11.2"},{"ecosystem":"Packagist","name":"twig/twig","fixedVersion":"3.14.1"}],"fix":{"url":"https://github.com/twigphp/Twig/commit/831c148e786178e5f2fde9db67266be3bf241c21","label":"twigphp/Twig@831c148"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/51xxx/CVE-2024-51755.json"},{"type":"ADVISORY","url":"https://github.com/twigphp/Twig/security/advisories/GHSA-jjxq-ff2g-95vh"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-51755"},{"type":"FIX","url":"https://github.com/twigphp/Twig/commit/831c148e786178e5f2fde9db67266be3bf241c21"},{"type":"WEB","url":"https://github.com/FriendsOfPHP/security-advisories/blob/master/twig/twig/CVE-2024-51755.yaml"},{"type":"PACKAGE","url":"https://github.com/twigphp/Twig"},{"type":"WEB","url":"https://symfony.com/blog/unguarded-calls-to-__isset-and-to-array-accesses-when-the-sandbox-is-enabled"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:48.789087591Z"}}