GHSA-9F5R-P27V-X2CH
Role Reorder Authorization Bypass in UserRoles Controller
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:L/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-9F5R-P27V-X2CH divulgada · CVSS 3.8 (GitHub) | |
| Divulgación | Modificada | Última actualización del registro | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
The backend `UserRoles` controller applies a rank-based visibility filter (`applyRankPermissionsToQuery`) to its list and form queries, so a non-super-user holding `admins.roles` can only see and edit roles ranked below their own. The `admins.roles` permission is documented as "Allow users to create new roles and manage roles lower than their highest role."
The generic list reorder handler in `Backend\Widgets\ListStructure::onReorder()` resolved the target record with `newQueryWithoutScopes()->find(post('record_id'))` and then wrote new `sort_order` values via `setSortableOrder(post('sort_orders'))`, updating every posted ID by raw primary key without consulting the controller's visibility filter. A caller with `admins.roles` could therefore reorder roles above their own rank, promote a higher role below their own, then open and impersonate it through the existing role-management form (which passes its own rank filter once the target's `sort_order` has been rewritten).
The reporter demonstrated the chain against the built-in Developer role and against a custom higher role, in both cases escalating to permissions the attacker's role did not hold before the reorder request.
Impact
- Privilege escalation across the documented rank boundary for any non-super user holding `admins.roles`
- Effective permissions of any higher backend role can be obtained via role impersonation after the reorder
- The rank changes persist in `backend_user_roles.sort_order` until an administrator corrects them
- Direct super-user takeover was not demonstrated; escalation is bounded by the highest non-super role the attacker can promote
Patches
The vulnerability has been patched in v3.7.18 and v4.3.5. `UserRoles` now hooks `backend.list.beforeReorderStructure` and rejects the request with `ForbiddenException` if the reorder target OR any ID in `sort_orders[]` / `root_sort_orders[]` falls outside the caller's rank-filtered role set.
Workarounds
If upgrading immediately is not possible:
- Revoke `admins.roles` from all non-super-user roles
- Review `backend_user_roles.sort_order` for unexpected changes and end active backend sessions after correcting any drift
References
- Reported by CodingRule
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
Packagistoctober/system |
Sin parche | — | — | — |
Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/octobercms/october/security/advisories/GHSA-9f5r-p27v-x2chLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
