CVE-2026-46634
CWE-693Published: July 14, 2026· Updated: Jul 16, 2026
Official Description
Twig is a template language for PHP. From 3.9.0 until 3.26.0, template_from_string() compiles an inner template under a synthesized __string_template__<hash> name that can fall outside a SourcePolicyInterface sandbox decision, allowing a sandboxed template that can call template_from_string and include to render an inner template without security policy enforcement. This issue is fixed in version 3.26.0.
Risk Analysis
This critical vulnerability in Twig versions 3.9.0 through 3.26.0, with a CVSS score of 9.8, allows sandboxed templates to bypass security policy enforcement. This occurs when template_from_string() compiles inner templates outside the SourcePolicyInterface sandbox.
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 compilation, especially from strings, adheres to defined security policies and sandboxing rules.
Technical Analysis
CVE-2026-46634 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 (3)
Quick Facts
Related CVEs (CWE-693)
Recommended Actions
- →Apply vendor patches immediately
- →Monitor CVE-2026-46634 in threat intel feeds
- →Review IDS/IPS signatures for exploitation attempts