Details
Record ids are the normal sequential user ids, and the administrator is usually id 1, so no guessing is required. The attacker can also change username, email, active and use_ldap on any account through the same request.
Impact
This is a broken access control and privilege escalation issue (CWE-285 Improper Authorization, CWE-266 Incorrect Privilege Assignment).
Who is impacted: any Poweradmin installation that has the REST API enabled and that has created at least one non-admin role holding user_edit_others (a delegated user-manager or helpdesk role). On such an installation, any holder of that role, using nothing more than their own API key, can reset the superuser's password and take over the administrator account. From there they control every zone, record, user and setting in Poweradmin, and, through the PowerDNS backend, the DNS data itself.
The severity is high because the outcome is full administrative takeover from a low-privilege authenticated position, over the network, with a single request and no user interaction. The reason it is not rated critical outright is the precondition that a delegated user_edit_others role exists and the API is enabled. The underlying defect is real regardless of configuration: the API does not enforce the superuser-edit protection or the user_passwd_edit_others permission that the web interface enforces, so the API grants more authority than the permission model intends.
Suggested fix: mirror the web guards in the API. In ApiPermissionService::canEditUser, reject a non-superuser editing a superuser target. In UserManagementService::updateUser, only write the password when the caller is editing their own account or holds user_passwd_edit_others. Apply the same to both V1 and V2 controllers.
Disclosure
Credit: Found by Saif Salah (https://saifsalah.github.io/)
Found during a security review of Poweradmin. Happy to coordinate a fix timeline and CVE before any public write-up.