Impact
Twig is a template language for PHP. Prior to 3.26.0, the column filter passes object arrays to PHP’s array_column(), which reads public and magic properties without reaching CoreExtension::getAttribute() or SandboxExtension::checkPropertyAllowed(), allowing an untrusted template author with column in allowedFilters to read properties that are not in the sandbox allowlist. The issue is a Class Interface Manipulation weakness (CWE-863) that enables unauthorized property access. This issue is fixed in version 3.26.0.
Affected Systems
The vulnerability affects Twig distributed by twigphp:Twig. Any installation running a Twig version earlier than 3.26.0 is vulnerable. Modern deployments of Twig 3.26.0 or later are not affected.
Risk and Exploitability
The CVSS score of 5.3 indicates a medium overall severity, while the EPSS score of < 1% signals a low likelihood of exploitation at present. The vulnerability is not listed in CISA’s KEV catalog. Attackers can exploit the flaw by providing a crafted template that utilizes the column filter, allowing them to read unrestricted object properties without triggering sandbox checks. The issue is specifically tied to the sandbox’s property allowlist and is mitigated by the fix released in version 3.26.0.
OpenCVE Enrichment
Debian DSA
Github GHSA