llamaCVEVulnerability Intelligence
/
Twig

CVE-2026-46627

Twig: Sandbox resource exhaustion via unbounded for / range()

Texto original en inglés · Ver en español

Solo en configuraciones específicasParche disponible
Descargar PNG JSON
CVSS 4.0
7.1
Alta
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N Fuente: CNA
6.5NVD · CVSS 3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
ExplotaciónSin evidenciaSSVC: ninguna · no figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versión3.26.0
Exposición129 dDesde la divulgación, 14 jul 2026, 4:15 p. m.
Detección111 dDesde la divulgación hasta su ingreso al índice
Decisión SSVCSeguir
Remediar en la ventana regular de mantenimiento
Sin explotación conocida, no automatizable e impacto técnico parcial. Hay versiones corregidas disponibles.
Hmm… no me convence. Vigílala de cerquita.Puede que hoy no pase nada. Puede.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Evaluación SSVC +1
Explotación
Remediación
Monitoreo
Detectada
Fuente: OSV +1
14 jul 26
16 jul 26
3 nov 26
20 nov 26
21 nov 26
14 jul 26
16 ago 26
17 sept 26
20 oct 26
21 nov 26
FechaFaseEventoDetalle
Divulgación Publicada CVE-2026-46627 divulgada · CVSS 7.1 (CNA)
Divulgación Evaluación SSVC CISA-ADP · explotación ninguna
Divulgación Modificada Última actualización del registro
Monitoreo Detectada Ingresó al índice
Monitoreo Fuente: OSV Registro visto por primera vez en OSV
Monitoreo Verificada Última verificación contra las fuentes
Resumen

Twig is a template language for PHP. Prior to 3.26.0, the Twig sandbox does not prevent a template from consuming CPU, memory, or wall-clock time, even under the strictest allow-list, allowing untrusted templates to cause resource exhaustion. This issue is addressed in version 3.26.0 by documenting that the sandbox does not protect against resource exhaustion.

Affects Twig releases before 3.26.0 in applications that render untrusted templates, where a template can exhaust CPU, memory, or run time even under the strictest sandbox allow-list. Fixed in 3.26.0.

¿Qué significa?A template can use unbounded for loops or range() calls to consume excessive CPU, memory, or wall-clock time. The Twig sandbox does not prevent this, even with the strictest allow-list.
¿Quién está afectado?The issue applies to applications that render untrusted Twig templates on Twig versions before 3.26.0. To check a installation, look up the installed Twig version (for example with composer show twig/twig) and compare it with 3.26.0.
¿Qué hacer?Upgrade Twig to 3.26.0, which is the fixed version listed for this vulnerability.
Contexto

Condiciones y alcance

Condiciones necesarias para que el fallo sea explotable
01
The application renders untrusted Twig templates.“If you render untrusted templates, you should contain them at the process level”
¿Quién debe revisar?Teams rendering untrusted Twig templates with the Twig sandbox in PHP apps using twig/twig before 3.26.0.
No protegeThe sandbox does not limit CPU, memory or time use, even under strict allow-lists.
MitigaciónContain untrusted template rendering at the process level, for example with PHP memory_limit and max_execution_time, isolated worker processes, or OS-level limits.
Vector CVSS 3.1

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · NVD
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:L
BajaAlta
PrivilegiosPR:L
NingunoBajosAltos
InteracciónUI:N
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:N
AltoBajoNinguno
IntegridadI:N
AltoBajoNinguno
DisponibilidadA:H
AltoBajoNinguno
Score de explotaciónQué tan fácil y probable es que la exploten
8.3/ 10Alto
Vector 8.3 (muy fácil) · sin evidencia de explotación.
Versiones

Rangos afectados

Afectada Corregida
Twig · twig/twig< 3.26.0
3.26.0
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
Twig
Corregida 3.26.0 — —
Versiones corregidas3.26.0
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Fabricantehttps://github.com/twigphp/Twig/security/advisories/GHSA-923g-j88x-j34q
Otrahttps://github.com/twigphp/Twig/commit/6bfa285e2f98651adb7aa480bf83a741d154f09f
Otrahttps://github.com/twigphp/Twig/releases/tag/v3.26.0

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.