CVE-2024-51755 json
Unguarded calls to __isset() and to array-accesses when the sandbox is enabled in Twig
published 2y ago modified 4mo ago also EUVD-2024-3273 , GHSA-jjxq-ff2g-95vh
- cvss
- 2.2
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.4%
- EPSS 0.4% chance of exploitation in 30 days, percentile 37%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- packagist twig/twig 3.11.2, 3.14.1
- symfony twig 3.11.2, 3.14.1
- php-twig Debian 14, Debian 13 3.14.2-1
debian advisories DEBIAN-CVE-2024-51755
Is CVE-2024-51755 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerCISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 2y ago
Exploit prediction
0.43% chance of exploitation in the next 30 days, higher than 37% of all scored CVEs (FIRST EPSS, 2026-11-11).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 2.2 | CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:L/I:N/A:N |
| GitHub | 3.1 | 2.2 | CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:L/I:N/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| packagist | twig/twig | <3.11.2 >=3.12, <3.14.1 |
3.11.2 3.14.1 |
Affected products
- twigphp Twig
Classification
- Weakness
-
- CWE-668 Exposure of Resource to Wrong Sphere
References
-
github.com
/twigphp/Twig/commit/831c148e786178e5f2fde9db67266be3bf241c21
web
-
github.com
/twigphp/Twig/security/advisories/GHSA-jjxq-ff2g-95vh
web
-
nvd.nist.gov
/vuln/detail/CVE-2024-51755
advisory
-
github.com
/FriendsOfPHP/security-advisories/blob/master/twig/twig/CVE-2024-51755.yaml
web
-
github.com
/twigphp/Twig
package
-
symfony.com
/blog/unguarded-calls-to-__isset-and-to-array-accesses-when-the-sandbox-is-enabled
web
Sources
- CVE List CVE-2024-51755
- GitHub Advisory GHSA-jjxq-ff2g-95vh
- NVD CVE-2024-51755
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.