GHSA-GM9R-XMHP-P55Q
User manager can grant super admin by hiding the access map under a YAML merge key
Texto original en inglés · Ver en español
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-GM9R-XMHP-P55Q divulgada | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
A non-super user manager can give an account super-admin rights by nesting the access map under a YAML merge key (`<<`). Account data written by a Flex create form (`admin.users.create`) or by the REST API (`api.users.write`, `PATCH /api/v1/users/<self>`) is filtered to remove super-admin grants, but a `<<` key survives the filter and YAML merges it back into the access map when the file is loaded. This is a further spelling of GHSA-mwjj-r7vm-pgqm and the same boundary as GHSA-m2rq-76vx-vv4j.
Affected versions
Grav 2.x from 2.0.0 up to and including 2.2.17 (the YAML writer dates from Grav 1.6.0). The attack is admin-tier, so no 1.7 release is part of this advisory. The API plugin is also affected, in its super-grant check.
Details
`BlueprintSchema::filterArray()` keeps undeclared keys under `validation: loose`, which the account blueprint uses. `UserObject::update()` strips only top-level keys. The Symfony YAML dumper writes the `<<` key as `'<<':` and the parser merges it back into the surrounding mapping on load, so `access.api.<<.super: true` is stored and then read as `access.api.super: true`. The reproducer uses a Flex create form with `data[<<][access]` fields.
The REST API route is cleaner. `PATCH /api/v1/users/<self>` with `{"access":{"api":{"<<":{"super":true}}}}` passes the API plugin's `accessGrantsSuper()` check and needs no page. `api.users.write` can already grant every non-super permission by design, and this gives it the super tier. The same applies to any YAML writer that is handed request data, such as form flash storage, Flex directory configuration and page frontmatter.
Impact
A user manager, or any account with `api.users.write`, becomes super admin, which is full control of the site. The attacker needs a granted user management right.
Patches
Fixed in Grav 2.2.18. YAML encoding refuses `<<` as a key, and the same check covers compiled YAML files, Markdown headers, Flex directory configuration saves and form flash storage, so a write that carries the key fails instead of being saved. Blueprint filtering of form data drops the key at any depth, so a form saves the rest of its data. A parsed file never contains `<<`, so round trips are safe. Update the API plugin to 1.1.6 as well: it answers such a write with a 422 response, and its `accessGrantsSuper()` check rejects an access map that contains `<<` with a validation error.
Credits
Discovered by Anthropic's OSS Scanner (ANT-2026-9CGIBKCA).
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-gm9r-xmhp-p55qLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
