CVE-2026-46633
Critical
Description
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.
SeverityCritical
CVSS9.8
Exploit probability—
Product
Symfony Twig
PublishedJul 14, 2026
First seenJul 14, 2026
Weakness typeCWE-94Code injection
How to fix
Update
- symfony twig3.26.0 or later
- twig/twig3.26.0 or later
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| symfony twig | v < 3.26.0 | 3.26.0 |
| twig/twigPackagist | v < 3.26.0, 1.15.1 ≤ v < 3.26.0 | 3.26.0 |
Check your version
Choose the product and enter the version you run to see whether it falls in the affected range.
In the Intelligence 360 plan
Attack Surface Management
See the assets tied to your domains, the technologies they run and known vulnerabilities in one list.