CVE-2026-46633CWE-94

Twig: PHP code injection via `{% use %}` template name

High · published July 14, 2026

CVSS v4.0
8.7
EPSS
1%
Percentile
52.2
In the wild
Unconfirmed
What it is

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.

The record
Technical detail
CVSS v4.0
8.7 · HIGH
Vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
EPSS
0.00688 · 52.2th percentile
Weakness
CWE-94 · Improper Control of Generation of Code ('Code Injection')
Published
2026-07-14T21:14Z
EPSS history
Timeline
  • 14 JUL 21:14Z
    Twig: PHP code injection via `{% use %}` template name
    cvelistv5