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: 5.3 [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]
CVE-ID: CVE-2026-46639
CWE-ID: CWE-693
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

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.


Affected software

Twig

How to mitigate CVE-2026-46639

Install security update from vendor's website.

Twig - update to 3.26.0

External References

Related Security Bulletins