llamaCVEVulnerability Intelligence
/
Advisory · GitHub · Packagist · craftcms/cms

GHSA-W643-X88W-6WCM

Twig "create()" blocklist case-sensitivity bypass

Parche disponible
Descargar PNG JSON
CVSS
—
low
Fuente: —
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche2 versiones4.18.8 · 5.11.0
Exposición47 dDesde la divulgación, 5 oct 2026, 12:27 p. m.
Detección44 dDesde la divulgación hasta su ingreso al índice
Decisión estimadaSeguir
Remediar en la ventana regular de mantenimiento
Estimación de Llama con el árbol SSVC de CISA a partir de la severidad declarada por GHSA (baja) y la evidencia de explotación (sin evaluación oficial): sin explotación conocida, no automatizable e impacto técnico parcial. Hay versiones corregidas disponibles.
Actualiza cuando toque, sin correr.Nivel de alerta: llama en hamaca.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Monitoreo
Detectada +1
5 oct 26
18 nov 26
22 nov 26
5 oct 26
17 oct 26
29 oct 26
10 nov 26
22 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-W643-X88W-6WCM divulgada
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
GitHub

The blocklist guarding Craft’s Twig `create()` function — introduced in 5.10.6 as the fix for 1369 — tests attacker-controlled class names with case-sensitive string prefix/suffix checks, while PHP class resolution is case-insensitive.

Passing the class name in lowercase (`create("splfileobject", …)`) bypasses both checks and instantiates `SplFileObject`, restoring arbitrary local file read and write from any template-execution context. File write escalates to remote code execution by writing a PHP file into the webroot and requesting it over HTTP.

Two independent defects combine in `Extension::createFunction()` (`src/web/twig/Extension.php:1543-1574`, 5.10.13.2):

  1. `str_starts_with(ltrim($class, '\\'), 'Spl')` (`:1564`) and `str_ends_with(rtrim($class, '\\'), 'Iterator')` (`:1568`) are case-sensitive; `Craft::createObject()` resolves `"splfileobject"` to `SplFileObject` regardless.
  2. When the `Spl` prefix check was added in 5.10.6, `SplFileObject` was simultaneously *removed* from the surviving case-insensitive `is_a()` blocklist (`:1550-1562`), so no case-insensitive check covers it at all.

This is a regression of the original 1369 fix: the proper case name is blocked, the lowercase name is not.

Impact

An attacker with template-execution rights (e.g., a Control Panel administrator in the default configuration) can:

  • Read any file the web user can read, including `.env` → theft of `CRAFT_SECURITY_KEY` and database credentials (Craft’s canonical privilege-escalation chain).
  • Write any file the web user can write; demonstrated end-to-end: PHP shell written into the webroot → HTTP-triggered code execution as the web user.
  • Defeat the blocklist as a security boundary for any other consumer of `create()`.

Report ID: 1681

Versiones

Rangos afectados

Afectada Corregida
craftcms/cms≥ 4.0.0 < 4.18.8
craftcms/cms≥ 5.0.0 < 5.11.0
4.0.0
4.18.8
5.0.0
5.11.0
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
Packagistcraftcms/cms
Corregida 4.18.8, 5.11.0 — —
Versiones corregidas4.18.85.11.0
Explotación

Arsenal público

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

Referencias
Advisoryhttps://github.com/craftcms/cms/security/advisories/GHSA-w643-x88w-6wcm

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