Protection Mechanism Failure in Twig - CVE-2026-46639

 

Protection Mechanism Failure in Twig - CVE-2026-46639

Published: May 20, 2026


Vulnerability identifier: #VU132000
CSH Severity: Low
CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N/E:U/U:Clear
CVE-ID: CVE-2026-46639
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 bypass sandbox property and method restrictions.

The vulnerability exists due to protection mechanism failure in ObjectDestructuringSetBinary::compile() when processing object-destructuring assignment expressions in sandboxed templates. A remote user can write a crafted sandboxed Twig template to bypass sandbox property and method restrictions.

Exploitation requires write access to a sandboxed template, and the issue affects property access and public getter invocation on objects passed to the template engine. The exploit also requires the {% do %} tag to be allowed.


How to mitigate CVE-2026-46639

Install security update from vendor's website.

Sources