# CVE-2024-51755: Unguarded calls to __isset() and to array-accesses when the sandbox is enabled in Twig

- Severity: Low 2.2 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:L/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.43%, higher than 38% of CVEs (2026-12-01)
- Published: 2024-11-06T19:27:05.347Z
- Modified: 2026-06-17T08:06:16.337Z
- Also known as: GHSA-jjxq-ff2g-95vh
- Weaknesses: CWE-668
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- twigphp Twig: < 3.11.2; >= 3.12.0, < 3.14.1
- twig/twig (Packagist): before 3.11.2; from 3.12 before 3.14.1

## Every score

- GitHub_M: CVSS:3.1 2.2 Low `CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:L/I:N/A:N`
- GitHub: CVSS:3.1 2.2 Low `CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:L/I:N/A:N`
- GitHub: CVSS:4.0 Low `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`

## References

- <https://github.com/twigphp/Twig/security/advisories/GHSA-jjxq-ff2g-95vh> (web)
- <https://github.com/twigphp/Twig/commit/831c148e786178e5f2fde9db67266be3bf241c21> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-51755> (advisory)
- <https://github.com/FriendsOfPHP/security-advisories/blob/master/twig/twig/CVE-2024-51755.yaml> (web)
- <https://github.com/twigphp/Twig> (package)
- <https://symfony.com/blog/unguarded-calls-to-__isset-and-to-array-accesses-when-the-sandbox-is-enabled> (web)

## Sources

- CVE List: [CVE-2024-51755](https://www.cve.org/CVERecord?id=CVE-2024-51755), CVE Terms of Use, modified 2024-11-07
- GitHub Advisory Database: [GHSA-jjxq-ff2g-95vh](https://github.com/advisories/GHSA-jjxq-ff2g-95vh), CC-BY-4.0, modified 2024-11-12
- NVD: [CVE-2024-51755](https://nvd.nist.gov/vuln/detail/CVE-2024-51755), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-51755 · Whole record: https://cve.day/CVE-2024-51755.json · Rebuilt by cve.day 2026-11-25T22:58:47.843Z
