CVE-2026-46633
Twig: PHP code injection via {% use %} template name
Texto original en inglés · Ver en español
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
Fuente: CNA
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HCiclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | CVE-2026-46633 divulgada · CVSS 8.7 (CNA) | |
| Divulgación | Evaluación SSVC | CISA-ADP · explotación ninguna | |
| Monitoreo | Detectada | Ingresó al índice | |
| Divulgación | Modificada | Última actualización del registro | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
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.
Twig from 1.15.1 before 3.26.0 is affected when templates use the {% use %} tag, even with allowedTags configured. Fixed in 3.26.0.
Condiciones y alcance
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
Twig |
Corregida | 3.26.0 | — | — |
3.26.0Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/twigphp/Twig/security/advisories/GHSA-7p85-w9px-jpjphttps://github.com/twigphp/Twig/commit/679447fa29083043665482ccf7d64372472621b8https://github.com/twigphp/Twig/commit/a2c6db7ea7d2c90923e6708019ec1442526d1c30https://github.com/twigphp/Twig/commit/e9ff55f6910832428e48a35b2e0748189ad49ae3https://gist.github.com/vladko312/d61b950f168c791db4786b83dc7a81e6https://github.com/FriendsOfPHP/security-advisories/blob/master/twig/twig/CVE-2026-46633.yamlhttps://github.com/twigphp/Twig/releases/tag/v3.26.0https://symfony.com/cve-2026-46633Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
