GHSA-h4hf-v6w5-897x: Poweradmin: API user-update endpoint leads to a non-admin reset any user's password and take over the superuser account
The REST API user-update endpoint (PUT/PATCH /api/v2/users/{id} and the V1 equivalent) does not enforce two authorization rules that the web interface enforces. A user who holds the user_edit_others permission but is not a superuser can:
- edit user accounts that belong to a superuser, and
- set the password of any account, even without the
user_passwd_edit_otherspermission.
Because of this, a non-admin “user manager” role can send a single API request that changes the administrator’s password, then log in as the administrator. This is a full privilege escalation and account takeover. The same actions are explicitly blocked in the web UI, so the API is inconsistent with the application’s own permission model.
References
- github.com/advisories/GHSA-h4hf-v6w5-897x
- github.com/poweradmin/poweradmin/commit/36e9081a5c83cb962dc6275b7adcd6cb463f1028
- github.com/poweradmin/poweradmin/commit/9bdda77bc103f283a0babcaf3355f3f95b360122
- github.com/poweradmin/poweradmin/commit/b90fd83e67e6d7b6ad6c9be3a1c0d2f45bd73b6c
- github.com/poweradmin/poweradmin/commit/ffb95d5201cad5cb38e3eabc4f8103cac2ca18e2
- github.com/poweradmin/poweradmin/releases/tag/v4.2.5
- github.com/poweradmin/poweradmin/releases/tag/v4.3.4
- github.com/poweradmin/poweradmin/security/advisories/GHSA-h4hf-v6w5-897x
Code Behaviors & Features
Detect and mitigate GHSA-h4hf-v6w5-897x with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →