CVE-2026-46633: Vulnerability in Symfony Twig

Critical. Twig is a template language for PHP. Starting in 1.15.1 and 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.

Packagist, CWE-94

Exploitation
None confirmed
Severity
9.8 of 10
Attack likelihood
0.8 % in 30 days
Fix
Fixed version known
Patch deadline
No deadline set

Details

Advisory ID
GHSA-7p85-w9px-jpjp
EU ID
EUVD-2026-44558
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-94
Published
21 May 2026
Last change
4 Nov 2026
Likelihood rank
Higher than 52 % of all rated vulnerabilities
Analysis status
Modified
Ecosystem
Packagist

Affected products

Affected versions and the first fixed release

  • Symfony Twig Before 3.26.0. Fixed in 3.26.0
  • Twigphp Twig From 1.15.1, before 3.26.0; Version >= 1.15.1, < 3.26.0. Fixed in 3.26.0

Affected packages

Vulnerable version ranges and fixed releases

  • twig/twig Packagist, Affected before 3.26.0. Fixed in 3.26.0

Advisories

Vendor and security advisories

Patches and fixes

Updates, commits and release notes

Related