Poweradmin: OIDC sub collation bypass in Poweradmin leading to account takeover
Poweradmin maps OIDC identities into local users through oidc_user_links.oidc_subject plus provider_id. In the MySQL schema, the OIDC link table explicitly uses utf8mb4_unicode_ci, which is case-insensitive and accent-insensitive. OIDC sub is a stable external subject identifier and should be matched byte-for-byte within the issuer/provider scope.
The confirmed local PoC used two different OIDC users:
victim-loginvictím-login (í, U+00ED)MySQL reported those two subjects as equal under utf8mb4_unicode_ci. After the victim linked their OIDC account, the attacker authenticated to the same provider with the attacker's own password and Poweradmin resolved the session to the victim's local account.
targets/poweradmin git e1f9c9a8.4.10, character_set_server=utf8mb4, collation_server=utf8mb4_unicode_ciAffected Entry Point:
```text
GET /oidc/login?provider=generic
GET /oidc/callback?code=...&state=...
```
Relevant request properties:
sub that collides with a victim's linked subsub stored and looked up as oidc_user_links.oidc_subjectoidc_user_links.oidc_subject uses an accent-insensitive collationThe MySQL schema defines the OIDC link table with utf8mb4_unicode_ci:
```sql
-- sql/poweradmin-mysql-db-structure.sql:341-356
CREATE TABLE oidc_user_links (
user_id INT(11) NOT NULL,
provider_id VARCHAR(50) NOT NULL,
oidc_subject VARCHAR(255) NOT NULL,
...
UNIQUE KEY unique_subject_provider (oidc_subject, provider_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
```
In the PoC database:
```text
Field Type Collation
provider_id varchar(50) utf8mb4_unicode_ci
oidc_subject varchar(255) utf8mb4_unicode_ci
SELECT 'victim-login' = 'victím-login' COLLATE utf8mb4_unicode_ci;
-- accent_collision = 1
```
sub flows into a normal SQL equality lookupPoweradmin reads the subject from OIDC userinfo data. If no custom subject mapping is configured, it uses the sub claim:
```php
// lib/Application/Service/OidcService.php:424-459
$resourceOwner = $provider->getResourceOwner($token);
$userData = $resourceOwner->toArray();
...
subject: $userData[$mapping['subject'] ?? 'sub'] ?? '',
```
The callback passes the resulting OidcUserInfo to provisioning:
```php
// lib/Application/Service/OidcService.php:269-291
$userInfo = $this->getUserInfo($provider, $token, $providerId);
$userId = $this->userProvisioningService->provisionUser($userInfo, $providerId);
```
Provisioning first tries to find an existing user by subject:
```php
// lib/Application/Service/UserProvisioningService.php:86-90
$existingUserId = $authMethod === self::AUTH_METHOD_SAML
? $this->findUserBySamlSubject($userInfo->getSubject(), $providerId)
: $this->findUserByOidcSubject($userInfo->getSubject(), $providerId);
```
The lookup is normal SQL equality evaluated under the column's weak collation:
```php
// lib/Application/Service/UserProvisioningService.php:145-149
$stmt = $this->db->prepare("
SELECT user_id FROM oidc_user_links
WHERE oidc_subject = ? AND provider_id = ?
");
$stmt->execute([$subject, $providerId]);
```
When the attacker authenticates with sub = victím-login, MySQL matches the existing row for oidc_subject = victim-login and returns the victim's user_id.
After provisioning returns the matched user_id, Poweradmin fetches the database username for that user and stores the matched user ID in the session:
```php
// lib/Application/Service/OidcService.php:307-317
$databaseUsername = $this->userProvisioningService->getDatabaseUsername($userId);
$this->setSessionValue('userlogin', $databaseUsername);
```
```php
// lib/Application/Service/OidcService.php:360-371
$this->setSessionValue('userid', $userId);
...
$this->setSessionValue('authenticated', true);
```
The attacker's OIDC password is validated by the IdP, but the local user_id selected by Poweradmin comes from the weak-collation SQL lookup.
An attacker who can register or control an OIDC principal with an accent/collation variant of a victim's OIDC subject can authenticate with the attacker's own IdP credentials and obtain a Poweradmin session for the victim's local account.
The confirmed PoC used distinct OIDC usernames, subjects, emails, and passwords. The attacker
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 none.
The score comes from this vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
GHSA-cmwh-g2h8-c222 is classified as CWE-287: Improper Authentication. The identity of the caller is not established correctly, so an attacker can act as another user.
GHSA-cmwh-g2h8-c222 is recorded against 1 package.
Published on 24 July 2026. No public exploit is currently recorded for this entry. Record sourced from OSV.
github.com (Web)
github.com (Web)
github.com (Web)
github.com (Package)
github.com (Web)
github.com (Web)
poweradmin/poweradmin has other advisories on record. If you are patching this one, these are worth checking on the same host:
These advisories are the same class of weakness (CWE-287: Improper Authentication) in other software:
Details
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
Affected Packages
| Software | From version | Fixed in |
|---|---|---|
| poweradmin/poweradmin | 4.3.0 | 4.3.4 |
References
Similar Threats
Site Security Check
GHSA-cmwh-g2h8-c222 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.
Stay up to date with the latest from Boteraser.
We use cookies to improve your experience on our site. By using our site, you consent to cookies.
Manage your cookie preferences below:
Essential cookies enable basic functions and are necessary for the proper function of the website.
CloudFlare provides web performance and security solutions, enhancing site speed and protecting against threats.
Service URL: developers.cloudflare.com (opens in a new window)
These cookies are needed for adding comments on this website.
These cookies are used for managing login functionality on this website.
Statistics cookies collect information anonymously. This information helps us understand how visitors use our website.
Google Analytics is a powerful tool that tracks and analyzes website traffic for informed marketing decisions.
Service URL: policies.google.com (opens in a new window)
You can find more information in our Cookie Policy and Privacy Policy.