GHSA-974H-Q6F4-MX7G
Bulk zone deletion checked the edit permission instead of the delete permission
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-974H-Q6F4-MX7G 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 treats editing zone content and deleting zones as separate permissions. The single-zone delete page checks `zone_delete_own` / `zone_delete_others`, but bulk zone deletion checked the edit permission instead. A user granted `zone_content_edit_own` but not `zone_delete_own` could delete their own zones, with all their records, through the bulk delete page.
Details (`page=delete_domains`)
File: `lib/Domain/Service/Dns/DomainManager.php`, method `deleteDomains()`
(and the underlying `deleteDomain()` used for single deletion, which has the
identical defect but is not reachable because the controller gates it
correctly - see below).
public function deleteDomains(array $domains): bool
{
foreach ($domains as $id) {
$perm_edit = Permission::getEditPermission($this->db); // wrong permission
$user_is_zone_owner = UserManager::verifyUserIsOwnerZoneId($this->db, $id);
if ($perm_edit == "all" || ($perm_edit == "own" && $user_is_zone_owner == "1")) {
// ... zone is deleted
}
}
}Poweradmin's permission model treats zone content editing and zone deletion
as separate, independently grantable permissions:
// Permission::getEditPermission() checks:
// zone_content_edit_others / zone_content_edit_own / zone_content_edit_own_as_client
// Permission::getDeletePermission() checks:
// zone_delete_others / zone_delete_ownThe single-zone deletion controller (`DeleteDomainController::run()`)
correctly gates on the delete-specific permissions before any deletion
logic runs:
$canDelete = UserManager::canUserPerformZoneAction($this->db, $userId, $zone_id, 'zone_delete_own');
$canDeleteOthers = UserManager::verifyPermission($this->db, 'zone_delete_others');
$this->checkCondition(!$canDeleteOthers && !$canDelete, _("You do not have the permission to delete a zone."));`DeleteDomainsController` (bulk) has no equivalent check - the only gate
is the flawed one inside `DomainManager::deleteDomains()`. A user who has
been granted `zone_content_edit_own` but deliberately *not*
`zone_delete_own` - a supported, documented permission separation
(`zone_delete_own`: "User is allowed to delete zones they own.") - can
delete their own zones anyway via the bulk endpoint.
Note on prior remediation attempt
Commit `6c4a2c8` ("fix(zones): gate zone deletion on delete permission and
require CSRF on bulk delete") previously added both a correct
`verifyDeletePermission()` check and CSRF validation to
`DeleteDomainsController`. It was fully reverted in `546bc1a`. A later
commit, `cc78047`, restored only the CSRF portion
("fix(zones): validate CSRF token on bulk zone deletion confirm"). The
permission fix from the original commit was never reintroduced, leaving the
authorization gap open on `main` today.
PoC
curl -X POST "https://TARGET/index.php?page=delete_domains" \
--cookie "PHPSESSID=<victim_session_with_edit_only_permission>" \
-H "X-CSRF-Token: <valid_token>" \
-d "zone_id[]=<owned_zone_id>" \
-d "confirm=1"As a user holding `zone_content_edit_own` but not `zone_delete_own`, this
request succeeds and the zone (and all its records) is permanently deleted,
even though the same user is correctly blocked from doing this via the
single-zone delete page (`page=delete_domain&id=<zone_id>`).
Impact
A user explicitly denied zone deletion can still permanently delete the zones they own, and all records in them, bypassing an intentional permission boundary.
Fix
Bulk zone deletion now checks `zone_delete_own` / `zone_delete_others` per zone, the same way the single-zone page does.
---
Confirmed. The mismatch dates from 4.1.0, when the single-zone path moved to the dedicated delete permission and the bulk path was left behind. The 3.x line is not affected. 4.0.x and 4.1.x are end of life and will not be patched. Split out of GHSA-jrjh-v4q7-mrr6 so each issue gets its own CVE.
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 | 4.2.6, 4.3.5, 4.4.1 | — | — |
4.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-974h-q6f4-mx7gLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
