llamaCVEVulnerability Intelligence
/
Twig

CVE-2026-24425

Twig 2.16.x & 3.9.0-3.25.x Sandbox Bypass via SourcePolicyInterface

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

Solo en configuraciones específicasParche disponibleprotection bypass
Descargar PNG JSON
CVSS 4.0
8.7
Alta
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
9.9NVD · CVSS 3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
ExplotaciónSin evidenciaSSVC: ninguna · no figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versión3.26.0
Exposición185 dDesde la divulgación, 20 may 2026, 8:45 a. m.
Detección155 dDesde la divulgación hasta su ingreso al índice
Decisión SSVCSeguir de cerca
Monitorear y programar la remediación
Sin explotación conocida, no automatizable e impacto técnico total. Hay versiones corregidas disponibles.
Mis orejas detectan algo raro por aquí.Programa la remediación y duerme tranquilo.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada +1
Modificada
Explotación
Remediación
Monitoreo
Detectada
Fuente: NIST NVD +1
20 may 26
22 oct 26
17 nov 26
18 nov 26
21 nov 26
20 may 26
5 jul 26
21 ago 26
6 oct 26
21 nov 26
FechaFaseEventoDetalle
Divulgación Publicada CVE-2026-24425 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 Fuente: NIST NVD Registro visto por primera vez en NIST NVD
Monitoreo Verificada Última verificación contra las fuentes
Resumen

Twig versions 2.16.x and 3.9.0 through 3.25.x contain a sandbox bypass vulnerability when using a SourcePolicyInterface that allows attackers with template rendering capabilities to pass arbitrary PHP callables to sort, filter, map, and reduce filters. Attackers can exploit the runtime check that fails to use the current template source to bypass sandbox restrictions and execute arbitrary code when the sandbox is enabled through a source policy rather than globally.

Affects Twig 3.9.0 to 3.25.x with a SourcePolicyInterface enabling the sandbox and sort, filter, map, or reduce filters. CVSS rates it 8.7 High; no vendor rating is given. Fixed in 3.26.0.

¿Qué significa?Attackers who can supply templates can pass arbitrary PHP callables to the sort, filter, map, and reduce filters. This bypasses the Twig sandbox and can lead to arbitrary code execution.
¿Quién está afectado?Twig versions 3.9.0 through 3.25.x are in the affected range. The sandbox must be enabled for a template by a SourcePolicyInterface rather than globally, and the template must use sort, filter, map, or reduce with a callback that is not a Closure. You can check your Twig version with composer show twig/twig and check your sandbox setup in your SourcePolicyInterface configuration.
¿Qué hacer?Upgrade Twig to 3.26.0 or later, which is the fixed version listed in the affected range.
Contexto

Condiciones y alcance

Condiciones necesarias para que el fallo sea explotable
01
The sandbox is not enabled globally.“The sandbox is not enabled globally;”
02
A SourcePolicyInterface enables the sandbox for the rendered template.“A SourcePolicyInterface enables the sandbox for the rendered template;”
03
The template uses one of the sort, filter, map, or reduce filters.“The template uses one of the sort , filter , map , or reduce filters;”
04
The callback passed is not a Closure.“The callback is not a Closure .”
¿Quién debe revisar?Teams running Twig (twig/twig via Composer) 2.16.x or 3.9.0 through 3.25.x that enable the sandbox through a SourcePolicyInterface rather than globally.
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:C
CambiadoSin cambio
ConfidencialidadC:H
AltoBajoNinguno
IntegridadI:H
AltoBajoNinguno
DisponibilidadA:H
AltoBajoNinguno
Score de explotaciónQué tan fácil y probable es que la exploten
8.7/ 10Muy alto
Vector 8.7 (muy fácil) · sin evidencia de explotación.
Versiones

Rangos afectados

Afectada Corregida
twig/twig≥ 2.16.0 ≤ 2.16.1
twig/twig≥ 3.9.0 < 3.26.0
2.16.0
2.16.1
3.9.0
3.26.0
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
twig/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.

Registro
EscenarioGENERALVulnCheck
Referencias
Fabricantehttps://github.com/twigphp/Twig/security/advisories/GHSA-2q52-x2ff-qgfr
Otrahttps://github.com/twigphp/Twig/releases/tag/v3.26.0
Otrahttps://www.vulncheck.com/advisories/twig-x-x-sandbox-bypass-via-sourcepolicyinterface

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