CVE-2026-46633
CWE-94Published: July 14, 2026· Updated: Jul 16, 2026
Official 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.
Risk Analysis
This critical vulnerability in Twig prior to version 3.26.0, with a CVSS score of 9.8, allows for arbitrary PHP expression injection into compiled cache files. This is due to improper escaping of single quotes in template names from {% use %} tags.
No public exploit is currently known for this vulnerability. The flaw is remotely exploitable (AV:N) and has low attack complexity (AC:L), making it a significant concern.
Upgrade Twig to version 3.26.0 or later. Ensure that all template names are properly escaped before being embedded in PHP string literals within compiled cache files.
Technical Analysis
CVE-2026-46633 can be exploited remotely over the network without requiring physical or adjacent access, significantly expanding the attack surface for threat actors.
The vulnerability requires no privileges and no user interaction, making it a prime target for automated exploitation campaigns and worm-like propagation.
A successful exploit results in complete confidentiality breach (data exposure), full integrity compromise (data manipulation), availability disruption (denial of service), with a CVSS base score of 9.8.
CVSS v3.1 Vector Breakdown
Affected Vendors & Products
Exploit & PoC Resources
Official Patches & Advisories
All References (4)
Quick Facts
Related CVEs (CWE-94)
Recommended Actions
- →Apply vendor patches immediately
- →Monitor CVE-2026-46633 in threat intel feeds
- →Review IDS/IPS signatures for exploitation attempts