llamaCVEVulnerability Intelligence
/
Advisory · GitHub · Packagist · poweradmin/poweradmin

GHSA-GQC9-4CXR-728J

Web user create path allows privilege escalation to superuser via unguarded perm_templ assignment

Parche disponible
Descargar PNG JSON
CVSS 3.1
8.8
Alta
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche4 versiones3.9.12 · 4.2.6 · 4.3.5 · 4.4.1
Exposición28 dDesde la divulgación, 24 oct 2026, 5:47 a. m.
Detección26 dDesde la divulgación hasta su ingreso al índice
Decisión estimadaSeguir de cerca
Monitorear y programar la remediación
Estimación de Llama con el árbol SSVC de CISA a partir de vector CVSS 3.1 y la evidencia de explotación (sin evaluación oficial): sin explotación conocida, no automatizable e impacto técnico total. Hay versiones corregidas disponibles.
Ponle fecha: las tareas sin fecha son leyendas.Si el fabricante actualiza el aviso, vuelve a mirar.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Monitoreo
Detectada +1
24 oct 26
19 nov 26
21 nov 26
24 oct 26
31 oct 26
7 nov 26
14 nov 26
21 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-GQC9-4CXR-728J divulgada · CVSS 8.8 (GitHub)
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

## Summary
Poweradmin's web user-management forms allow a delegated (non-superuser) user-administrator to escalate to full superuser (`user_is_ueberuser`, "god mode"). The create path (`POST /users/add`) accepts an attacker-chosen `perm_templ` value and write it to the database with NO content-aware guard. By submitting `perm_templ=1` (the seeded `Administrator` permission template, which is `template_type='user'` yet carries permission 53 `user_is_ueberuser`), the attacker promotes a controlled account — or creates a brand-new account with chosen credentials — to full superuser over the multi-tenant DNS install.

This is the SAME vulnerability class the maintainer fixed on the REST API path via GHSA-h4hf-v6w5-897x (`PermissionTemplateAssignmentGuard`), but that guard is applied ONLY to the API v1/v2 controllers. The web-UI create path was never covered — an UNFIXED VARIANT on distinct code paths and sinks.

## Root Cause
The API fix's `PermissionTemplateAssignmentGuard::apply()` is invoked only in `lib/Application/Controller/Api/V1/UsersController.php:1035` and `Api/V2/UsersController.php:1034`. The web controllers (`EditUserController`, `AddUserController`) invoke no content-aware guard. The `templateGrantsUberuser`/`permissionTemplateAssignmentError` guard pair added post-v4.4.0 exists ONLY inside `UserManager::updateUserDetails` (the bulk path) — never in `editUser()` or `addNewUser()`.

Intermediate checks do not block promotion:
- `DbPermissionTemplateRepository::validateTemplateType(1,'user')` (:189-200) checks only the `template_type` column, not template contents. Template id 1 is `template_type='user'` (sql/poweradmin-mysql-db-structure.sql:128) yet maps to perm 53 `user_is_ueberuser` (`perm_templ_items (1,1,53)` at :148-149; perm 53 = `user_is_ueberuser` at :102).
- For the create path, the "force minimal template" branch (`AddUserController.php:122-130`) is skipped whenever `show_user_access_templates=true` — the DEFAULT (config/settings.defaults.php:130) — so the attacker's `perm_templ` survives.

The sinks bind `:perm_templ` from caller input gated ONLY by `verifyPermission('user_edit_templ_perm')`:
- `UserManager::addNewUser()` (UserManager.php:1215-1216) — INSERT.

## Impact
An authenticated non-superuser holding ordinary, grantable delegation permissions escalates to full superuser: complete read/write/delete over every zone and user in the multi-tenant install. HIGH — C:H/I:H/A:H.

## Proof of Concept
Create a fresh superuser with known credentials:

POST /users/add HTTP/1.1
Cookie: <delegated-admin session>
Content-Type: application/x-www-form-urlencoded

_token=<csrf>&username=backdoor&email=b@x.tld&password=Passw0rd!&perm_templ=1&active=1

Attacker perms: `user_add_new` + `user_edit_templ_perm`. Then log in as `backdoor` → full god mode.

## Attack Chain
1. Entry: `POST /users/add` (routes.yaml `/users/add → AddUserController::run`) with `perm_templ=1`, chosen username/password. Guard: `checkPermission('user_add_new')` (:89). Bypass proof: attacker legitimately holds `user_add_new` → passes.
2. Processing: minimal-force branch (:122-130). Bypass proof: `show_user_access_templates` defaults true → `if(!$showUserAccessTemplates)` FALSE → override skipped → `perm_templ=1` survives.
3. Guard: `validateTemplateType(1,'user')` (:134). Bypass proof: id 1 is a 'user' template → passes.
4. Sink: `UserManager::addNewUser()` (UserManager.php:1215-1216) binds `:perm_templ` from caller input gated only by `verifyPermission('user_edit_templ_perm')`; no `templateGrantsUberuser` (grep of 1160-1228 = 0). INSERT executes.
5. Impact: new account holds `user_is_ueberuser`; attacker logs in with chosen credentials → god mode.

## Bypass Evidence
- `grep -rn "PermissionTemplateAssignmentGuard|templateGrantsUberuser"` → hits only in API v1/v2 UsersControllers, the guard class, unit tests, and `UserManager::updateUserDetails`. The web `EditUserController`/`AddUserController` and the `editUser`/`addNewUser` sinks: ZERO content-aware guard.
- `git show v4.4.0:lib/Domain/Model/UserManager.php | grep -c templateGrantsUberuser` = 0 (guard absent entirely on the latest release for these functions).
- `git log -S templateGrantsUberuser` → only commit `bbe9225e` (updateUserDetails, post-v4.4.0, unreleased). No commit ever added a content guard to `editUser` or `addNewUser` on any branch.
- Template id 1 = ueberuser: `sql/poweradmin-mysql-db-structure.sql:128` `(1,'Administrator',...,'user')`; `:148-149` `perm_templ_items (1,1,53)`; `:102` perm 53 = `user_is_ueberuser`.
- Note: `assignUserToGroups` re-checks ueberuser (:326), so GROUP escalation IS blocked — underscoring that the guard was applied inconsistently and the `perm_templ` path was missed.

## Affected Versions
`poweradmin/poweradmin <= 4.4.0` (vulnerable on the latest release tag v4.4.0 AND current HEAD 4ccd1ccf; no fix on any branch for these web sinks).

## Suggested Fix
Apply the same content-aware guard the API path uses (`PermissionTemplateAssignmentGuard` / `templateGrantsUberuser`) inside `UserManager::editUser()` and `UserManager::addNewUser()` (or at the `EditUserController`/`AddUserController` boundary): reject assigning any permission template that grants `user_is_ueberuser` unless the acting user is themselves a superuser. Validate template CONTENTS, not just `template_type`.

---
Reported by zx (Jace) — GitHub: @manus-use

Split from GHSA-4rpw-2m35-325x, which originally covered this together with the web edit path.

Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.

Vector CVSS 3.1

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:L
BajaAlta
PrivilegiosPR:L
NingunoBajosAltos
InteracciónUI:N
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:H
AltoBajoNinguno
IntegridadI:H
AltoBajoNinguno
DisponibilidadA:H
AltoBajoNinguno
Score de explotaciónQué tan fácil y probable es que la exploten
8.3/ 10Alto
Vector 8.3 (muy fácil) · sin evidencia de explotación.
Versiones

Rangos afectados

Afectada Corregida
poweradmin/poweradmin≥ 3.0.0 < 3.9.12
poweradmin/poweradmin≥ 4.0.0 < 4.2.6
poweradmin/poweradmin≥ 4.3.0 < 4.3.5
poweradmin/poweradmin≥ 4.4.0 < 4.4.1
3.0.0
3.9.12
4.0.0
4.2.6
4.3.0
4.3.5
4.4.0
4.4.1
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
Packagistpoweradmin/poweradmin
Corregida 3.9.12, 4.2.6, 4.3.5, 4.4.1 — —
Versiones corregidas3.9.124.2.64.3.54.4.1
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://github.com/poweradmin/poweradmin/security/advisories/GHSA-gqc9-4cxr-728j

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.