Vulnerability · Published Nov 6, 2024 · Assigned by GitHub_M
CVE-2024-51755Unguarded calls to __isset() and to array-accesses when the sandbox is enabled in Twig
Low 2.2
In plain English
A low-severity security flaw in Twig from twigphp. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.4% (higher than 37% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | php-twig | no fix listed | DEBIAN-CVE-2024-51755 |
| Debian:13 | php-twig | 3.14.2-1 | DEBIAN-CVE-2024-51755 |
| Debian:14 | php-twig | 3.14.2-1 | DEBIAN-CVE-2024-51755 |
| Packagist | twig/twig | 3.11.2 | GHSA-jjxq-ff2g-95vh |
| Packagist | twig/twig | 3.14.1 | GHSA-jjxq-ff2g-95vh |
Affected products (as reported)
Weakness: CWE-668 · Vector: CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:L/I:N/A:N