GHSA-MH59-VJM5-J5RC
User manager can take over a super admin by disabling the super-admin group
Texto original en inglés · Ver en español
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-MH59-VJM5-J5RC divulgada | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
A non-super Grav account whose only admin grant is `admin.users.update` can take over a super admin and then make itself super admin, by switching off the group that gives the victim `admin.super` and then setting the victim's password through a Flex account form. This gets around the guard that Grav 2.2.13 added to keep user managers away from super-admin accounts. It is a sibling of GHSA-xhfv-7758-r9hx and GHSA-vv8m-jqpm-38x4: the earlier fixes protected a group's `access` map, but left its `enabled` toggle writable by user managers.
Affected versions
Grav 2.x from 2.0.0 up to and including 2.2.17. The bypass defeats the guard added in 2.2.13. Earlier 2.x releases lack that guard entirely and are covered by the earlier advisories. The attack is admin-tier, so no 1.7 release is part of this advisory.
Details
In the `user/group` blueprint only the `access` field is reserved for super admins, so `enabled` is writable by a user manager. The 2.2.13 guard, `UserObject::hasSuperAccess()`, asks the groups through `authorize()` without the test scope, and a disabled group answers `null`, so the guard stops treating the group's members as super admins. The login-side check in `UserTrait::authorize()` still grants the group's access map whether or not the group is enabled. The two checks disagree, and the gap is the attack.
A manager posts `data[enabled]=0` for the super-granting group through a front-end page that holds the stock Flex `user-groups` edit form. It then opens the victim's `user-accounts` form (403 before, 200 after), sets a new password, signs in as the victim with full super access, and grants `admin.super` to itself with the group still switched off. The reproducer runs on the default demo site and also with `system.accounts.type: flex`. It shows the control refused with 403, the group saved as `enabled: false`, an API sign-in as the super admin with the manager's chosen password, and `super: true` written into the manager's account file. The REST API is not a way in. A closely related variant (ANT-2026-JDO40R3K) reaches the same guard with a group that sets Super User to `false` while another group grants it, because `UserGroupCollection::authorize()` is deny-wins whereas `UserTrait` and the API's permission resolver treat any granting group as super.
The preconditions are a super admin who has delegated user management to the attacker, front-end pages with the Flex edit forms for `user-groups` and `user-accounts` (any publisher can add them, the manager cannot), and a victim whose super access comes from a group instead of the account's own access map. The installer-created admin keeps it on the account and is not reachable this way.
Impact
A user manager becomes super admin. The rating is High despite the preconditions because the outcome is full control and the boundary crossed is the one the 2.2.13 guard was added to protect.
Patches
Fixed in Grav 2.2.18. The group `enabled` field now carries `security@: admin.super`, `UserGroupObject` gets its own `isAuthorizedOverride()` that refuses `update` and `delete` on a group granting super admin to an account that is not a super admin, and `hasSuperAccess()` asks each group on its own, so any group that grants super counts whether or not it is enabled or overridden by another group. Disabled groups no longer grant permissions to regular accounts either, which is a behavior change noted in the release notes: operators who relied on a disabled group still granting access need to re-enable it. Update the API plugin to 1.1.6 as well, which applies the same rule when it resolves API permissions.
Credits
Discovered by Anthropic's OSS Scanner (ANT-2026-LNMJZU8F).
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
Packagistgetgrav/grav |
Corregida | 2.2.18 | — | — |
2.2.18Arsenal 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-mh59-vjm5-j5rcLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
