GHSA-9J3W-6Q4P-C73C
API v2 exposes zone templates and their records to users without any zone-template permission
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-9J3W-6Q4P-C73C divulgada · CVSS 4.3 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
`GET /api/v2/zone-templates` performs no `zone_templ_*` check whatsoever, and the
record-level gate returns true for every global template to any authenticated
caller. A user holding none of the zone-template permissions (the stock "Editor"
template, for instance) reads the global templates and all their records, while the
web interface refuses the same user.
Split from GHSA-372f-95vm-4mj3, which originally covered this together with a separate
web cross-template IDOR. The API v2 zone-template controllers first shipped in 4.2.0.
Affected Component
GET /api/v2/zone-templates
GET /api/v2/zone-templates/{id}/records
GET /api/v2/zone-templates/{id}/records/{recordId}Technical Details
`lib/Application/Controller/Api/V2/ZoneTemplatesController.php:106-112`:
private function listZoneTemplates(): JsonResponse
{
$userId = $this->getAuthenticatedUserId();
$isUeberuser = $this->apiPermissionService->userHasPermission($userId, 'user_is_ueberuser');
$templates = $this->repository->listZoneTemplates($userId, $isUeberuser);`user_is_ueberuser` only widens the scope; there is no `zone_templ_add` or
`zone_templ_edit` check on the way in.
`lib/Application/Controller/Api/V2/ZoneTemplateRecordsController.php:98-110`:
private function canViewTemplate(int $userId, int $templateId): bool
{
if ($this->apiPermissionService->userHasPermission($userId, 'user_is_ueberuser')) {
return true;
}
$owner = $this->repository->getOwner($templateId);
if ($owner === 0) {
return true; // every global template, to any caller
}
return $this->repository->isOwner($templateId, $userId);
}This feeds `listRecords` (`:196`) and `getRecord` (`:371`).
The web twin refuses the same user outright,
`lib/Application/Controller/ListZoneTemplController.php:53-58`:
$hasPermission = UserManager::verifyPermission($this->db, 'zone_templ_add') ||
UserManager::verifyPermission($this->db, 'zone_templ_edit') ||
UserManager::verifyPermission($this->db, 'user_is_ueberuser');
$this->checkCondition(!$hasPermission, _("You do not have the permission to view zone templates."));Reproduction
As `editor`, the stock template 3, which holds neither `zone_templ_add` nor
`zone_templ_edit`:
GET /api/v2/zone-templates
{"templates":[{"id":1,"name":"Corp Standard","description":"internal infra template","owner":0,"is_global":true,...}]}
GET /api/v2/zone-templates/1/records
{"records":[{"name":"[ZONE]","type":"NS","content":"ns1.internal.corp.example",...},
{"name":"vpn.[ZONE]","type":"A","content":"10.7.0.9",...}]}The same account is refused the web zone-template list by
`ListZoneTemplController.php:53-58`.
Impact
Global zone templates are where an operator keeps NS hostnames, hostmaster addresses
and internal infrastructure records, so this discloses internal network topology and
naming to users the operator deliberately did not grant zone-template access. Nothing
is mutated.
Severity
Medium - CVSS 4.3
`CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N`
CWE-862 - Missing Authorization
Remediation
Path 2. Require `zone_templ_add` / `zone_templ_edit` / `user_is_ueberuser` in
`listZoneTemplates()`, matching `ListZoneTemplController.php:53-58`, and drop the
`$owner === 0` short-circuit in `canViewTemplate()` so a global template is
subject to the same permission the web demands.
References
- `lib/Application/Controller/Api/V2/ZoneTemplatesController.php:106-112`
- `lib/Application/Controller/Api/V2/ZoneTemplateRecordsController.php:98-110, 196, 371`
- `lib/Application/Controller/ListZoneTemplController.php:53-58`
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-9j3w-6q4p-c73cLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
