8.7 HighCWE-94
CVE-2026-46633
Twig: PHP code injection via `{% use %}` template name
twigphpTwig
Status
- Not in CISA KEV
Exploit probabilityEPSSchecked 23 Oct
0.7%probability of exploitation in the next 30 days
Higher than 52% of scored CVEs
SeverityCVSS
8.7High
Description NVD
Twig is a template language for PHP. Prior to 3.26.0, Compiler::string() does not escape single quotes when a template name from a {% use %} tag is placed inside a PHP single-quoted string literal, allowing a crafted template name to terminate the string and inject arbitrary PHP expressions into the compiled cache file. This issue is fixed in version 3.26.0.
Coverage 1 article · 1 outlet
- Critical Twig template flaws let attackers run arbitrary PHP codeSecurityOnline · first in our coverage · mentions it in passing