Live threats

All CVEs / twigphp

CVE-2024-51755twigphp Twig

Low 2.2

Priority
13
CVSS 3.1
2.2
EPSS
0.6%
probability of exploitation in 30 days · percentile 42
Auth required
Yes
Published
Nov 6, 2024
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-668
SSVC (CISA)
Exploitation: none · Automatable: no · Technical impact: partial
Vector
CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:L/I:N/A:N

What happens

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for Twig.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
Packagist twig/twig < 3.11.2 3.11.2 composer require "twig/twig:^3.11.2"
Packagist twig/twig ≥ 3.12 < 3.14.1 3.14.1 composer require "twig/twig:^3.14.1"

Per OSV / GitHub Advisories (GHSA-jjxq-ff2g-95vh). Check the version in your lockfile before upgrading.

Affected products

As reported by the CNA that published the CVE. NVD has not added CPEs with versions yet.

Official sources

References

Links published by the sources. Open them with care.