Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. twig/twig
  4. ›
  5. CVE-2024-51755

CVE-2024-51755: Twig has unguarded calls to `__isset()` and to array-accesses when the sandbox is enabled

November 6, 2024 (updated November 12, 2024)

In a sandbox, and 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.

References

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

Code Behaviors & Features

Detect and mitigate CVE-2024-51755 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 3.11.2, all versions starting from 3.12 before 3.14.1

Fixed versions

  • 3.11.2
  • 3.14.1

Solution

Upgrade to versions 3.11.2, 3.14.1 or above.

Impact 2.2 LOW

CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:L/I:N/A:N

Learn more about CVSS

Weakness

  • CWE-668: Exposure of Resource to Wrong Sphere

Source file

packagist/twig/twig/CVE-2024-51755.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:14:54 +0000.