NetSight
kritisch9.8

CVE-2026-46633

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

Auswirkung

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.

Ein Angreifer kann die Lücke über das Netzwerk ausnutzen, ohne Anmeldung, ohne Zutun eines Nutzers. Bei Erfolg: hohes Risiko, dass Daten ausgelesen werden, hohes Risiko, dass Daten oder Systeme verändert werden, hohes Risiko für Ausfälle.

Betroffene Pakete

ÖkosystemPaketBetroffenBehoben in
composertwig/twig< 3.26.03.26.0

Betroffene Produkte

HerstellerProduktBetroffene Versionen
SymfonyTwig
vor 3.26.0
TwigphpTwig
ab 1.15.1, vor 3.26.0

Schwachstellenklasse

Referenzen