CVE-2026-46634CWE-693

Twig: `template_from_string()` escapes a SourcePolicy-driven sandbox via synthesized template name

High · published July 14, 2026

CVSS v4.0
7.7
EPSS
1%
Percentile
48.8
In the wild
Unconfirmed
What it is

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.

The record
Technical detail
CVSS v4.0
7.7 · HIGH
Vector
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
EPSS
0.00616 · 48.8th percentile
Weakness
CWE-693 · Protection Mechanism Failure
Published
2026-07-14T21:19Z
EPSS history
Timeline
  • 14 JUL 21:19Z
    Twig: `template_from_string()` escapes a SourcePolicy-driven sandbox via synthesized template name
    cvelistv5