Skip to main content

Boteraser | Website and Server Security Solutions

🛡️ GHSA-h4hf-v6w5-897x — poweradmin

🟠 CVSS 8.0 — High ✅ No Known Exploit CWE-620 OSV
8.0
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

Poweradmin: API user-update endpoint leads to a non-admin reset any user's password and take over the superuser account

Summary

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:

1. edit user accounts that belong to a superuser, and

2. set the password of any account, even without the user_passwd_edit_others permission.

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.

Details

Poweradmin's permission model treats these as three distinct permissions:

  • user_edit_others (id 57): "User is allowed to edit other users."
  • user_passwd_edit_others (id 58): "User is allowed to edit the password of other users."
  • user_is_ueberuser (id 53): full admin.

The existence of a separate user_passwd_edit_others permission means that "edit other users" is not supposed to include changing their passwords. The web UI enforces this, and it additionally forbids any non-superuser from editing a superuser account at all. The API skips both rules.

Where the API is missing the superuser check.

lib/Domain/Service/ApiPermissionService.php, canEditUser():

```php

public function canEditUser(int $userId, int $targetUserId): bool

{

if ($this->userHasPermission($userId, 'user_is_ueberuser')) {

return true;

}

if ($userId === $targetUserId && $this->userHasPermission($userId, 'user_edit_own')) {

return true;

}

// User with user_edit_others can edit ALL users, including superusers

if ($this->userHasPermission($userId, 'user_edit_others')) {

return true;

}

return false;

}

```

There is no check on whether the target is a superuser. Compare this with the web controller lib/Application/Controller/EditUserController.php (lines 237 to 243), which explicitly refuses:

```php

// Prevent non-superusers from editing superuser accounts (privilege escalation protection)

$targetIsSuperuser = UserManager::isUserSuperuser($this->db, $editId);

$currentIsSuperuser = UserManager::verifyPermission($this->db, 'user_is_ueberuser');

if ($targetIsSuperuser && !$currentIsSuperuser) {

$this->showError(_('You do not have permission to edit a superuser account.'));

}

```

The comment in the maintainers' own code calls this "privilege escalation protection." The API has no equivalent.

Where the API is missing the password permission check.

lib/Domain/Service/UserManagementService.php, updateUser() (lines 393 to 413) writes the password whenever one is supplied, with no permission check at all (it only refuses when the target is an external-auth user):

```php

if (!empty($userData['password'])) {

$user = $this->userRepository->getUserById($userId);

$authMethod = $user['auth_method'] ?? 'sql';

$externalAuthMethods = ['oidc', 'saml', 'ldap'];

if (in_array($authMethod, $externalAuthMethods, true)) {

return [ 'success' => false, 'message' => '...', 'status' => 400 ];

}

// Hash password if allowed <-- no permission check happens here

$userData['password'] = password_hash($userData['password'], PASSWORD_DEFAULT);

}

$success = $this->userRepository->updateUser($userId, $userData);

```

Compare the web path lib/Domain/Model/UserManager.php, editUser(), which only writes the password column when the caller has the right permission:

```php

$edit_own_perm = self::verifyPermission($this->db, 'user_edit_own');

$passwd_edit_others_perm = self::verifyPermission($this->db, 'user_passwd_edit_others');

if ($user_password != "" && ($edit_own_perm || $passwd_edit_others_perm)) {

...

$query .= ", password = :password";

}

```

The call path. lib/Application/Controller/Api/V2/UsersController.php, updateUser() (lines 701 to 727):

```php

if (!$this->apiPermissionService->canEditUser($currentUserId, $targetUserId)) { // line 708

... 403 ...

}

$result = $this->userManagementService->updateUser($targetUserId, $input); // line 727

```

So canEditUser returns true for any user_edit_others holder against any target, and updateUser then writes the password with no further check. The V1 controller (lib/Application/Controller/Api/V1/UsersController.php) has the same shape.

Note: perm_templ is separately protected (a PermissionTemplateAssignmentGuard rejects it unless the caller has user_edit_templ_perm), so an attacker cannot elevate their own template through the API. They do not need to. Resetting the administrator's password and logging in as the administrator achieves full control directly.

<img width="1324" height="986" alt="temp-pe

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is low, an attacker needs low-level privileges on the target. No user interaction is required. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality high, integrity high, availability high.

CVSS metrics in full

The score comes from this vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

  • Attack vector: Network — reachable from anywhere that can route to the service.
  • Attack complexity: Low — the attack works reliably, with no preparation.
  • Privileges required: Low — an ordinary user account is enough.
  • User interaction: None — nobody has to be tricked into anything.
  • Scope: Unchanged — the damage stays inside the vulnerable component.
  • Confidentiality impact: High — total loss, or loss the attacker controls.
  • Integrity impact: High — total loss, or loss the attacker controls.
  • Availability impact: High — total loss, or loss the attacker controls.

Weakness class

GHSA-h4hf-v6w5-897x is classified as CWE-620: Unverified Password Change. A password can be changed without confirming the current one or the identity of the requester.

Affected software

GHSA-h4hf-v6w5-897x is recorded against 1 package.

  • poweradmin/poweradmin (from 4.3.0 up to 4.3.4)

Timeline and source

Published on 24 July 2026. No public exploit is currently recorded for this entry. Record sourced from OSV.

References

github.com (Web)
github.com (Web)
github.com (Web)
github.com (Web)
github.com (Web)
github.com (Package)
github.com (Web)
github.com (Web)

Other advisories for this package

poweradmin/poweradmin has other advisories on record. If you are patching this one, these are worth checking on the same host:

Same weakness in other software

These advisories are the same class of weakness (CWE-620: Unverified Password Change) in other software:

Details

Severity HIGH
CVSS Score 8.0
CVSS Vector CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CWE CWE-620
Public Exploit ✅ No
Source OSV
Published 2026-07-24
Updated 2026-08-20
Modified 2026-07-24
Fix URL N/A

Affected Packages

Software From version Fixed in
poweradmin/poweradmin 4.3.0 4.3.4

Similar Threats

Site Security Check

Is poweradmin part of your stack?

GHSA-h4hf-v6w5-897x is rated CVSS 8.0 High. BotEraser scans your installation against known CVE records and tells you whether this vulnerability applies to the versions you actually run.

Scan My Site Free →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.

Browse related advisories

All advisoriesGitHub AdvisoryGitHub Advisory Undated
✓