llamaCVEVulnerability Intelligence
/
Advisory · GitHub · Packagist · october/system

GHSA-8RGJ-G632-3QFP

Safe Mode Sandbox Bypass via Nested Callable in SafeCollection

Parche disponible
Descargar PNG JSON
CVSS 3.1
3.3
Baja
CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:L/I:L/A:N Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versión4.2.25
Exposición35 dDesde la divulgación, 15 oct 2026, 2:23 p. m.
Detección34 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Monitoreo
Detectada +1
15 oct 26
19 nov 26
15 oct 26
24 oct 26
2 nov 26
11 nov 26
19 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-8RGJ-G632-3QFP divulgada · CVSS 3.3 (GitHub)
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

The Twig sandbox proxy `SafeCollection` stripped callables from arguments at the top level only, using a single `is_callable($param)` check. A callable nested inside an array argument passed through unstripped. `Illuminate\Support\Collection::sortBy()` accepts an array of comparisons whose elements may themselves be callables and invokes them with two values from the collection. A Safe Mode template could therefore call `collect([$a, $b]).sortBy([[['Class', 'method']]])` to invoke an arbitrary `Class::method($a, $b)` with attacker-controlled string arguments. Chained with `File::put` as a gadget, the primitive could write a CMS template file containing a PHP code section directly to disk, bypassing the save-time Safe Mode check (which only runs through the Halcyon model layer, not against raw file writes), and execute on the next page render.

This issue only affects installations running with `cms.safe_mode` enabled. Safe Mode is a niche opt-in feature, primarily used for demo installations and multi-tenant or shared-editor scenarios where untrusted users are deliberately granted access to the CMS markup editor. In standard production deployments Safe Mode is off, backend access is restricted to trusted administrators, and a markup editor can already execute arbitrary PHP directly. The disclosure path closed here is the Safe Mode boundary itself, so installations without Safe Mode enabled are not exposed.

### Impact
- Arbitrary `Class::method($a, $b)` invocation from a Safe Mode Twig template, with the two arguments being attacker-controlled strings selected from the source collection.
- Chained with a string-string method such as `File::put`, this allows arbitrary file write under the web server identity, which can be parlayed into PHP code execution by writing a CMS template that carries a PHP code section.
- Requires `cms.safe_mode` to be enabled, and a backend user with CMS markup editing access who is not intended to be trusted as a full administrator.
- Not exploitable when Safe Mode is disabled.

### Patches
The vulnerability has been patched in v4.2.25. `SafeCollection` now strips callables from arguments recursively, walking nested arrays and nulling any callable found at any depth before forwarding the call to the underlying collection. The hybrid-method string-keep behaviour (allowing class-name strings as attribute lookups in methods such as `contains` and `groupBy`) is preserved.

### Workarounds
If upgrading immediately is not possible, restrict CMS markup editing access to fully trusted administrators only, the standard October CMS recommendation for any deployment.

### References
- Reported by repo4Chu

Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.

Vector CVSS 3.1

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:H
BajaAlta
PrivilegiosPR:H
NingunoBajosAltos
InteracciónUI:N
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:L
AltoBajoNinguno
IntegridadI:L
AltoBajoNinguno
DisponibilidadA:N
AltoBajoNinguno
Versiones

Rangos afectados

Afectada Corregida
october/system≥ 4.2.0 < 4.2.25
4.2.0
4.2.25
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
Packagistoctober/system
Corregida 4.2.25 — —
Versiones corregidas4.2.25
Explotación

Arsenal público

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

Referencias
Advisoryhttps://github.com/octobercms/october/security/advisories/GHSA-8rgj-g632-3qfp

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