Code Injection in Twig - CVE-2026-46640
Published: May 20, 2026
Twig
Detailed vulnerability description
The vulnerability allows a remote user to execute arbitrary code.
The vulnerability exists due to improper control of code generation in MacroReferenceExpression compilation when processing template source that uses `_self.(
Code execution occurs at template-load time before `checkSecurity()` is called, resulting in a bypass of `SandboxExtension`.