Protection Mechanism Failure in Twig - CVE-2026-46639
Published: May 20, 2026
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.