CVE-2026-46633: fallo de gravedad alta en twigphp Twig
Twig: PHP code injection via `{% use %}` template name
Publicada el · Actualizada el
Aviso por correo cuando entre en el KEV, tenga PoC pública o suba de nota.
21Vexday Risk Score
Sin señal de explotación. Ningún artefacto público de explotación conocido hasta ahora.
ssvc Trackcvss 8.7epss 0.8%
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.
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
Productos afectados
twigphp · TwigCVEs relacionadas — twigphp Twig
En el mismo producto, de las más peligrosas a las menos.
CVE-2022-23614HIGHCode injection in TwigEPSS 8.2%CVE-2022-39261HIGHTwig may load a template outside a configured directory when using the filesystem loaderEPSS 3.2%CVE-2024-45411HIGHTwig has a possible sandbox bypassEPSS 0.8%CVE-2026-24425HIGHTwig 2.16.x & 3.9.0-3.25.x Sandbox Bypass via SourcePolicyInterfaceEPSS 0.8%CVE-2026-46640HIGHTwig: Arbitrary PHP code execution via `_self.(<string>)` macro-reference compilationEPSS 0.6%CVE-2026-46634HIGHTwig: `template_from_string()` escapes a SourcePolicy-driven sandbox via synthesized template nameEPSS 0.6%
Referencias
https://gist.github.com/vladko312/d61b950f168c791db4786b83dc7a81e6https://github.com/FriendsOfPHP/security-advisories/blob/master/twig/twig/CVE-2026-46633.yamlhttps://github.com/twigphp/Twig/commit/679447fa29083043665482ccf7d64372472621b8https://github.com/twigphp/Twig/commit/a2c6db7ea7d2c90923e6708019ec1442526d1c30https://github.com/twigphp/Twig/commit/e9ff55f6910832428e48a35b2e0748189ad49ae3https://github.com/twigphp/Twig/releases/tag/v3.26.0https://github.com/twigphp/Twig/security/advisories/GHSA-7p85-w9px-jpjphttps://symfony.com/cve-2026-46633