CVE-2024-51755
LOW 2.2CVSS 3.1Twig has unguarded calls to `__isset()` and to array-accesses when the sandbox is enabled
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.
- Published
- 6 Nov 2024
- Last modified
- 17 Jun 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Deferred
- Weakness
- CWE-668
- Also known as
- GHSA-jjxq-ff2g-95vh
- Sources
- NVDJSONOSV GHSA-jjxq-ff2g-95vhJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| OSV | GitHub | CVSS 4.0 | 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 | |
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | LOW 2.2 | CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:L/I:N/A:N |
| OSV | GitHub | CVSS 3.1 | LOW 2.2 | CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:L/I:N/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | Packagist | twig/twig | < 3.11.2 | 3.11.2 |
| OSV | Packagist | twig/twig | >= 3.12, < 3.14.1 | 3.14.1 |
References
- https://github.com/twigphp/Twig/commit/831c148e786178e5f2fde9db67266be3bf241c21 · WEB
- https://github.com/twigphp/Twig/security/advisories/GHSA-jjxq-ff2g-95vh · 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
History
- 25 Nov 2026 20:56 UTC · NVD: first stored (published 6 Nov 2024)
- 25 Nov 2026 20:15 UTC · OSV: first stored (published 6 Nov 2024)