{"id":"CVE-2024-51755","aliases":["CLSA-2026-1783991054","CLSA-2026-1784682913","CLSA-2026-1788348414","DEBIAN-CVE-2024-51755","EUVD-2024-3273","GHSA-jjxq-ff2g-95vh","UBUNTU-CVE-2024-51755"],"status":"published","title":"Unguarded calls to __isset() and to array-accesses when the sandbox is enabled in Twig","description":"Twig is a template language for PHP. In a sandbox, an attacker can access attributes of Array-like objects as they were not checked by the security policy. They are now checked via the property policy and the `__isset()` method is now called after the security check. This is a BC break. This issue has been patched in versions 3.11.2 and 3.14.1. All users are advised to upgrade. There are no known workarounds for this issue.","severity":{"version":"3.1","score":2.2,"vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:L/I:N/A:N","level":"low","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-11","score":0.00425,"percentile":0.37267,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-668"],"published":"2024-11-06T19:27:05Z","modified":"2026-11-02T12:02:57Z","fixes":[{"ecosystem":"Packagist","package":"twig/twig","fixed_in":["3.11.2","3.14.1"],"sources":["ghsa","osv"]},{"ecosystem":"TuxCare:Packagist","package":"twig/twig","fixed_in":["v1.44.8-p2+tuxcare"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"php-twig","fixed_in":["3.14.2-1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"php-twig","fixed_in":["3.14.2-1"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"Packagist","package":"twig/twig","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.11.2"}]}]},{"source":"ghsa","ecosystem":"Packagist","package":"twig/twig","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.12"},{"fixed":"3.14.1"}]}]},{"source":"osv","ecosystem":"TuxCare:Packagist","package":"twig/twig","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"v2.16.1"},{"fixed":"v2.16.1-p1+tuxcare"}]}],"versions":["v2.16.1"],"bundled":11},{"source":"osv","ecosystem":"TuxCare:Packagist","package":"twig/twig","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"v2.15.6"},{"fixed":"v2.15.6-p2+tuxcare"}]}],"versions":["v2.15.6","v2.15.6-p1+tuxcare"],"bundled":10},{"source":"osv","ecosystem":"TuxCare:Packagist","package":"twig/twig","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"v1.44.8"},{"fixed":"v1.44.8-p2+tuxcare"}]}],"versions":["v1.44.8","v1.44.8-p1+tuxcare"]},{"source":"osv","ecosystem":"Debian:12","package":"php-twig","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.10.1-1","3.10.3-1","3.11.0-1","3.13.0-1","3.14.0-1","3.14.0-2","3.14.0-3","3.14.0-4","3.14.2-1","3.14.2-2","3.14.2-3","3.15.0-1","3.15.0-2","3.17.1-1","3.17.1-2","3.18.0-1","3.18.0-2","3.18.0-4","3.18.0-5","3.18.0-6","3.18.0-7","3.19.0-1","3.19.0-1~bootstrap","3.20.0-1","3.20.0-1~bootstrap","3.20.0-2","3.21.1-1","3.21.1-2","3.21.1-3","3.22.0-1","3.22.0-2","3.22.1-1","3.22.1-2","3.22.1-3","3.22.2-1","3.22.2-2","3.23.0-1","3.23.0-2","3.24.0-1","3.26.0-1","3.27.0-1","3.27.1-1","3.28.0-1","3.30.0-1","3.5.1-1","3.5.1-1+deb12u1","3.5.1-1+deb12u2","3.5.1-1+deb12u3","3.6.0-1","3.6.1-1","3.7.0-1","3.7.1-1","3.7.1-2","3.7.1-3","3.8.0-1","3.8.0-2","3.8.0-3","3.8.0-4","3.9.3-1","4.0.0~alpha1-1"]},{"source":"osv","ecosystem":"Debian:13","package":"php-twig","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.14.2-1"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"php-twig","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.14.2-1"}]}]},{"source":"osv","ecosystem":"Packagist","package":"twig/twig","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.11.2"}]}],"versions":["1.3.0","1.4.0","1.5.0","1.5.1","1.6.0","1.6.1","1.6.2","1.6.3","1.6.4","1.6.5","v1.10.0","v1.10.1","v1.10.2","v1.10.3","v1.11.0","v1.11.1","v1.12.0","v1.12.0-RC1","v1.12.1","v1.12.2","v1.12.3","v1.13.0","v1.13.1","v1.13.2","v1.14.0","v1.14.1","v1.14.2","v1.15.0","v1.15.1","v1.16.0","v1.16.1","v1.16.2","v1.16.3","v1.17.0","v1.18.0","v1.18.1","v1.18.2","v1.19.0","v1.20.0","v1.21.0","v1.21.1","v1.21.2","v1.22.0","v1.22.1","v1.22.2","v1.22.3","v1.23.0","v1.23.1","v1.23.2","v1.23.3","v1.24.0","v1.24.1","v1.24.2","v1.25.0","v1.26.0","v1.26.1","v1.27.0","v1.28.0","v1.28.1","v1.28.2","v1.29.0","v1.30.0","v1.31.0","v1.32.0","v1.33.0","v1.33.1","v1.33.2","v1.34.0","v1.34.1","v1.34.2","v1.34.3","v1.34.4","v1.35.0","v1.35.1","v1.35.2","v1.35.3","v1.35.4","v1.36.0","v1.37.0","v1.37.1","v1.38.0","v1.38.1","v1.38.2","v1.38.3","v1.38.4","v1.39.0","v1.39.1","v1.40.0","v1.40.1","v1.41.0","v1.42.0","v1.42.1","v1.42.2","v1.42.3","v1.42.4","v1.42.5","v1.43.0","v1.43.1","v1.44.0","v1.44.1","v1.44.2","v1.44.3","v1.44.4","v1.44.5","v1.44.6","v1.44.7","v1.44.8","v1.7.0","v1.8.0","v1.8.1","v1.8.2","v1.8.3","v1.9.0","v1.9.1","v1.9.2","v2.0.0","v2.1.0","v2.10.0","v2.11.0","v2.11.1","v2.11.2","v2.11.3","v2.12.0","v2.12.1","v2.12.2","v2.12.3","v2.12.4","v2.12.5","v2.13.0","v2.13.1","v2.14.0","v2.14.1","v2.14.10","v2.14.11","v2.14.12","v2.14.13","v2.14.2","v2.14.3","v2.14.4","v2.14.5","v2.14.6","v2.14.7","v2.14.8","v2.14.9","v2.15.0","v2.15.1","v2.15.2","v2.15.3","v2.15.4","v2.15.5","v2.15.6","v2.16.0","v2.16.1","v2.2.0","v2.3.0","v2.3.1","v2.3.2","v2.4.0","v2.4.1","v2.4.2","v2.4.3","v2.4.4","v2.4.5","v2.4.6","v2.4.7","v2.4.8","v2.5.0","v2.6.0","v2.6.1","v2.6.2","v2.7.0","v2.7.1","v2.7.2","v2.7.3","v2.7.4","v2.8.0","v2.8.1","v2.9.0","v3.0.0","v3.0.0-BETA1","v3.0.1","v3.0.2","v3.0.3","v3.0.4","v3.0.5","v3.1.0","v3.1.1","v3.10.0","v3.10.1","v3.10.2","v3.10.3","v3.11.0","v3.11.1","v3.2.1","v3.3.0","v3.3.1","v3.3.10","v3.3.2","v3.3.3","v3.3.4","v3.3.5","v3.3.6","v3.3.7","v3.3.8","v3.3.9","v3.4.0","v3.4.1","v3.4.2","v3.4.3","v3.5.0","v3.5.1","v3.6.0","v3.6.1","v3.7.0","v3.7.1","v3.8.0","v3.9.0","v3.9.1","v3.9.2","v3.9.3"]},{"source":"osv","ecosystem":"Packagist","package":"twig/twig","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.12"},{"fixed":"3.14.1"}]}],"versions":["v3.12.0","v3.13.0","v3.14.0"]},{"source":"osv","ecosystem":"Ubuntu:Pro:16.04:LTS","package":"twig","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.20.0-1","1.23.1-1ubuntu1","1.23.1-1ubuntu4","1.23.1-1ubuntu4+esm1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:18.04:LTS","package":"twig","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.24.0-2ubuntu1","2.4.4-2ubuntu1","2.4.6-1","2.4.6-1ubuntu0.1~esm1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:20.04:LTS","package":"php-twig","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.11.3-2","2.12.1-1","2.12.2-1","2.12.3-1","2.12.5-1","2.12.5-1ubuntu0.1~esm1","2.12.5-1ubuntu0.1~esm2"]},{"source":"osv","ecosystem":"Ubuntu:Pro:22.04:LTS","package":"php-twig","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.3.2-1ubuntu3","3.3.4-1","3.3.6-1","3.3.7-1","3.3.8-2ubuntu4","3.3.8-2ubuntu4+esm1","3.3.8-2ubuntu4+esm2"]},{"source":"osv","ecosystem":"Ubuntu:Pro:24.04:LTS","package":"php-twig","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.7.0-1","3.7.1-1","3.8.0-2","3.8.0-2ubuntu0.1~esm1","3.8.0-2ubuntu1","3.8.0-2ubuntu1+esm1"]}],"products":[{"vendor":"twigphp","product":"twig"}],"references":[{"url":"https://github.com/twigphp/Twig/security/advisories/GHSA-jjxq-ff2g-95vh","tags":["x_refsource_CONFIRM","advisory","web","report"]},{"url":"https://github.com/twigphp/Twig/commit/831c148e786178e5f2fde9db67266be3bf241c21","tags":["x_refsource_MISC","fix","web","report"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-51755","tags":["advisory"]},{"url":"https://github.com/FriendsOfPHP/security-advisories/blob/master/twig/twig/CVE-2024-51755.yaml","tags":["web"]},{"url":"https://symfony.com/blog/unguarded-calls-to-__isset-and-to-array-accesses-when-the-sandbox-is-enabled","tags":["web"]},{"url":"https://github.com/advisories/GHSA-jjxq-ff2g-95vh"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/51xxx/CVE-2024-51755.json","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2024-51755","tags":["advisory"]},{"url":"https://github.com/twigphp/Twig","tags":["package"]},{"url":"https://ubuntu.com/security/CVE-2024-51755","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2024-51755","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2024-51755","title":"Unguarded calls to __isset() and to array-accesses when the sandbox is enabled in Twig","description":"Twig is a template language for PHP. In a sandbox, an attacker can access attributes of Array-like objects as they were not checked by the security policy. They are now checked via the property policy and the `__isset()` method is now called after the security check. This is a BC break. This issue has been patched in versions 3.11.2 and 3.14.1. All users are advised to upgrade. There are no known workarounds for this issue.","status":"published","published":"2024-11-06T19:27:05.347Z","modified":"2024-11-07T15:12:59.408Z","cvss":[{"version":"3.1","score":2.2,"vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:L/I:N/A:N","level":"low","assessor":"cna"}],"cwes":["CWE-668"],"updated_at":"2026-11-02T14:34:01.972857Z"}],"euvd":[{"id":"EUVD-2024-3273","description":"Twig is a template language for PHP. In a sandbox, an attacker can access attributes of Array-like objects as they were not checked by the security policy. They are now checked via the property policy and the `__isset()` method is now called after the security check. This is a BC break. This issue has been patched in versions 3.11.2 and 3.14.1. All users are advised to upgrade. There are no known workarounds for this issue.","status":"published","published":"2024-11-06T19:27:05Z","modified":"2024-11-07T15:12:59Z","cvss":[{"version":"3.1","score":2.2,"vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:L/I:N/A:N","level":"low"}],"updated_at":"2026-11-03T00:05:08.721426Z"}],"ghsa":[{"id":"GHSA-jjxq-ff2g-95vh","title":"Twig has unguarded calls to `__isset()` and to array-accesses when the sandbox is enabled","description":"### 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","status":"published","published":"2024-11-06T19:52:55Z","modified":"2024-11-12T19:43:03Z","cvss":[{"version":"4.0","score":2.1,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N","level":"low"},{"version":"3.1","score":2.2,"vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:L/I:N/A:N","level":"low"}],"cwes":["CWE-668"],"updated_at":"2026-11-02T14:38:17.357217Z"}],"nvd":[{"id":"CVE-2024-51755","description":"Twig is a template language for PHP. In a sandbox, an attacker can access attributes of Array-like objects as they were not checked by the security policy. They are now checked via the property policy and the `__isset()` method is now called after the security check. This is a BC break. This issue has been patched in versions 3.11.2 and 3.14.1. All users are advised to upgrade. There are no known workarounds for this issue.","status":"published","published":"2024-11-06T20:15:06.077Z","modified":"2026-06-17T08:06:16.337Z","cvss":[{"version":"3.1","score":2.2,"vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:L/I:N/A:N","level":"low","assessor":"secondary"}],"cwes":["CWE-668"],"updated_at":"2026-11-02T14:10:36.560164Z"}],"osv":[{"id":"CVE-2024-51755","title":"Unguarded calls to __isset() and to array-accesses when the sandbox is enabled in Twig","description":"Twig is a template language for PHP. In a sandbox, an attacker can access attributes of Array-like objects as they were not checked by the security policy. They are now checked via the property policy and the `__isset()` method is now called after the security check. This is a BC break. This issue has been patched in versions 3.11.2 and 3.14.1. All users are advised to upgrade. There are no known workarounds for this issue.","status":"published","published":"2024-11-06T19:27:05.347Z","modified":"2026-10-28T02:30:48.389624513Z","cvss":[{"version":"3.1","score":2.2,"vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:L/I:N/A:N","level":"low"}],"cwes":["CWE-668"],"updated_at":"2026-11-02T15:44:44.032344Z"},{"id":"DEBIAN-CVE-2024-51755","description":"Twig is a template language for PHP. In a sandbox, an attacker can access attributes of Array-like objects as they were not checked by the security policy. They are now checked via the property policy and the `__isset()` method is now called after the security check. This is a BC break. This issue has been patched in versions 3.11.2 and 3.14.1. All users are advised to upgrade. There are no known workarounds for this issue.","status":"published","published":"2024-11-06T20:15:06.077Z","modified":"2026-11-02T12:02:57.007033627Z","cvss":[{"version":"3.1","score":2.2,"vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:L/I:N/A:N","level":"low"}],"updated_at":"2026-11-02T15:45:44.117337Z"},{"id":"GHSA-jjxq-ff2g-95vh","title":"Twig has unguarded calls to `__isset()` and to array-accesses when the sandbox is enabled","description":"### 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","status":"published","published":"2024-11-06T19:52:55Z","modified":"2024-11-12T19:45:48.742422Z","cvss":[{"version":"3.1","score":2.2,"vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:L/I:N/A:N","level":"low"},{"version":"4.0","score":2.1,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N","level":"low"}],"cwes":["CWE-668"],"updated_at":"2026-11-02T15:46:50.687609Z"},{"id":"UBUNTU-CVE-2024-51755","description":"Twig is a template language for PHP. In a sandbox, an attacker can access attributes of Array-like objects as they were not checked by the security policy. They are now checked via the property policy and the `__isset()` method is now called after the security check. This is a BC break. This issue has been patched in versions 3.11.2 and 3.14.1. All users are advised to upgrade. There are no known workarounds for this issue.","status":"published","published":"2024-11-06T20:15:00Z","modified":"2025-10-24T05:14:29Z","cvss":[{"version":"3.1","score":2.2,"vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:L/I:N/A:N","level":"low"}],"updated_at":"2026-11-02T16:55:11.182485Z"},{"id":"CLSA-2026-1783991054","title":"TuxCare security update for twig/twig (11 CVEs)","description":"TuxCare rebuilt twig/twig to address 11 CVEs. Fixed in v2.16.1-p1+tuxcare.","status":"published","published":"2026-08-04T14:52:43Z","modified":"2026-10-15T09:47:53.468304893Z","updated_at":"2026-11-02T15:43:46.151924Z"},{"id":"CLSA-2026-1784682913","title":"TuxCare security update for twig/twig (10 CVEs)","description":"TuxCare rebuilt twig/twig to address 10 CVEs. Fixed in v2.15.6-p2+tuxcare.","status":"published","published":"2026-08-04T14:52:46Z","modified":"2026-10-15T09:47:59.839636397Z","updated_at":"2026-11-02T15:43:46.482572Z"},{"id":"CLSA-2026-1788348414","title":"TuxCare security update for twig/twig (1 CVE)","description":"TuxCare rebuilt twig/twig to address 1 CVE. Fixed in v1.44.8-p2+tuxcare.","status":"published","published":"2026-09-02T11:26:54Z","modified":"2026-10-15T09:48:00.527954753Z","updated_at":"2026-11-02T15:43:47.591214Z"}]}}
