Protection Mechanism Failure in Twig - CVE-2026-24425

 

Protection Mechanism Failure in Twig - CVE-2026-24425

Published: May 20, 2026


Vulnerability identifier: #VU132002
CSH Severity: Medium
CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U/U:Green
CVE-ID: CVE-2026-24425
CWE-ID: CWE-693
Exploitation vector: Remote access
Exploit availability: No public exploit available
Vendor: Symfony
Affected software:
Twig

Detailed vulnerability description

The vulnerability allows a remote user to execute arbitrary code.

The vulnerability exists due to protection mechanism failure in callback-accepting filters when processing user-controlled templates in sandbox mode enabled through a source policy. A remote user can supply a non-Closure callback to execute arbitrary code.

The issue affects the sort, filter, map, and reduce filters only when the sandbox is not enabled globally and a SourcePolicyInterface enables sandboxing for the rendered template.


How to mitigate CVE-2026-24425

Install security update from vendor's website.

Sources