GHSA-MWJJ-R7VM-PGQM
Grav CMS group blueprint `security@` guard bypass via flat dot-notation key leads to privilege escalation
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-MWJJ-R7VM-PGQM divulgada · CVSS 8.8 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
A group's `access` map is a super-admin-only field: the core group blueprint gates it with `security@: admin.super`, so a non-super operator's submitted `access` data is stripped before save (the fix for GHSA-xhfv-7758-r9hx). That guard is keyed on the field's own path.
Submitting a flat dot-notation key — `access.admin.super` instead of the nested `access[admin][super]` — resolves to no field rule at all, survives blueprint filtering and flattening, and is then written by `FlexObject::update()` via `setNestedProperty()`, which splits on `.` and reconstructs the nested value.
An operator holding only `admin.users` can thereby grant `admin.super` to a group they belong to, or to their own account, and escalate to full super-admin.
Affected versions
Grav 2.0.14 through 2.0.24 — every release carrying the incomplete GHSA-xhfv-7758-r9hx guard.
Exploitation requires the flex accounts backend and an authenticated account holding `admin.users` but not `admin.super`.
Details
`Blueprint::dynamicSecurity()` translates `security@: admin.super` into a recursive `validate.ignore = true` on the guarded field for any non-super user. `BlueprintSchema::filterArray()` then drops a field only when the resolved rule carries `validate.ignore` or `disabled`, and it resolves that rule by the exact item path:
$val = $rules[$key] ?? $rules['*'] ?? null;
$rule = is_string($val) ? $this->items[$val] : $this->items[$parent . $key] ?? null;
For a nested submission this resolves to the guarded `access` rule and the whole subtree is dropped. For the flat key `access.admin.super`, both lookups miss, `$rule` is null, the guard is skipped, and the key falls through to the loose-mode extra-key branch that keeps it. `flattenData()` keeps it too. `FlexObject::update()` filters, flattens, then calls `setNestedProperty('access.admin.super', true)`, which explodes on `.` and writes `access -> admin -> super = true`.
Nothing between the request and disk re-authorizes the individual permission, because the flat key never resolves to the `permissions` field a `check_authorize` would consult.
The same guard protects `groups` and `access` on the account blueprint, so the identical technique also escalates the submitting operator's own account, not only a group.
Proof of concept
As an authenticated operator with `admin.users` and without `admin.super`:
POST /admin/user/groups/operators/task:save
{"data":{"groupname":"operators","access.admin.super":true}}
`user/groups.yaml` gains `operators.access.admin.super: true`, and every member of that group — including the submitter — now authorizes `admin.super`.
Impact
An authenticated backend operator with only user and group management rights escalates to super-admin: full control of configuration, plugin and theme installation, the file manager, and every account. This crosses a trust boundary, and operators should upgrade once the patch publishes.
Patches
Fixed in core by honouring the field guard for flat dot-notation input. `BlueprintSchema::filterArray()` now drops any dotted key whose ancestor path is `disabled` or `validate.ignore`, closing the bypass for every `security@` and `disabled` field across both the group and account forms.
Credits
Reported by @movon-ava, with an accurate mechanism analysis and a working proof of concept.
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 |
|---|---|---|---|---|
Packagistgetgrav/grav |
Corregida | 2.0.25 | — | — |
2.0.25Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/getgrav/grav/security/advisories/GHSA-mwjj-r7vm-pgqmLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
