GHSA-V9QG-HRRP-XX7H
Authenticated RCE via filemanager_select::select ExecMethod2 with attacker-controlled method/id
Texto original en inglés · Ver en español
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-V9QG-HRRP-XX7H divulgada · CVSS 8.8 (GitHub) | |
| Divulgación | Modificada | Última actualización del registro | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
## Summary
`filemanager_select::select` (exposed via `public_functions`) copies the attacker-controlled `$_GET['method']` and `$_GET['id']` verbatim, preserves them across the eTemplate round-trip, and on form submit executes `ExecMethod2($content['method'], $content['id'], $files)`. `ExecMethod2` calls `is_callable()` first, so `method=system` becomes a direct `call_user_func_array('system', [$id, $files])` — arbitrary command execution for any authenticated user with the (default-granted) filemanager app.
## Root Cause
`filemanager/inc/class.filemanager_select.inc.php`:
- `:52` `'select' => true` (in `public_functions`).
- `:91-92` raw assignment of `$_GET['method']` / `$_GET['id']` (no validation).
- `:304-312` both values placed into `$preserve` so they survive the et2 round-trip.
- `:183` `$js = ExecMethod2($content['method'], $content['id'], $files);`
`api/src/loader/deprecated_factory.php:81` — `ExecMethod2($acm, ...)` checks `is_callable($acm)`; if callable it does `call_user_func_array($acm, $args)` at `:106`, so `method=system, id=<cmd>` → `system('<cmd>')`.
## Impact
Arbitrary shell command execution as the web-server user by any authenticated user (no admin gate). Empirically confirmed: `system`/`passthru` execute the injected command.
## Proof of Concept
1. GET `index.php?menuaction=filemanager.filemanager_select.select&mode=saveas&path=/&name=a&method=system&id=touch%20/tmp/pwned` → server renders the picker with `method`/`id` in `$preserve` plus a valid `etemplate_exec_id`.
2. Submit the form with `button[ok]` (attacker owns the exec-id) → `ExecMethod2('system','touch /tmp/pwned',$files)` executes.
## Attack Chain
1. Entry: authenticated user GETs the select action with `mode=saveas&method=system&id=touch /tmp/pwned`. Guard: `$content['mode']` ∈ {open,open-multiple,saveas,select-dir} (`:81`). Bypass proof: attacker picks `saveas`; `method`/`id` have no validation (`:91-92` assign raw).
2. Entry-2: attacker submits the form with `button[ok]`. Guard: eTemplate CSRF token (`etemplate_exec_id`). Bypass proof: attacker owns both requests, so the token is legitimately theirs; `method != 'download_url'` → else-branch (`:181`).
3. Sink: `:183` `ExecMethod2('system','touch /tmp/pwned',$files)` → `is_callable('system')` true → `call_user_func_array('system', ['touch /tmp/pwned', $files])`. Guard: none. Bypass proof: `ExecMethod2` invokes the callable directly (`deprecated_factory.php:106`).
4. Impact: arbitrary command as web-server user.
## Bypass Evidence
Subagent empirically invoked the sink: `system`/`passthru` executed the injected command (`shell_exec` fails only on arg-count). The `is_callable` branch bypasses class-parsing entirely. There is no admin gate; the filemanager app is default-granted (`setup/admin_account.php:136`).
## Affected Versions
`<= 26.7.20260702` — sink present on HEAD (`filemanager_select.inc.php:183`).
## Suggested Fix
Validate `method` against a strict allowlist of intended callbacks (or remove the caller-supplied method entirely), and never pass request-derived strings as the first argument to `ExecMethod2`/`call_user_func_array`.
---
Reported by zx (Jace)
Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
Packagistegroupware/egroupware |
Corregida | 23.1.20260710, 26.7.20260710 | — | — |
23.1.2026071026.7.20260710Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/EGroupware/egroupware/security/advisories/GHSA-v9qg-hrrp-xx7hLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
