Admidio has Inverted 2FA Reset Authorization Check that Lets Group Leaders Strip Admin TOTP
Summary
A logic error in Admidio's two-factor authentication reset inverts the authorization check. Non-admin users cannot remove their own TOTP configuration, but they can remove other users' TOTP, including administrators. A group leader with profile edit rights on an admin account can strip that admin's 2FA.
Details
In modules/profile/two_factor_authentication.php at line 84, the authorization check uses an inverted condition:
// modules/profile/two_factor_authentication.php line 84
if (!($gCurrentUser->isAdministrator() || $gCurrentUserId !== $userId))
{
throw new AdmException('SYS_NO_RIGHTS');
}
By De Morgan's law, this condition evaluates as:
- Blocks when:
NOT isAdministrator() AND $gCurrentUserId === $userId - In practice: blocks non-admins from resetting their OWN 2FA
- Passes: non-admins resetting OTHER users' 2FA (the opposite of the intended behavior)
The intended logic should block non-admins from resetting other users' 2FA. The !== operator on line 84 should be ===.
A group leader who holds hasRightEditProfile() permission on an admin user (checked earlier in the flow) can exploit this to strip 2FA from administrator accounts, reducing their security to password-only authentication.
Proof of Concept
- As
testuser(a non-admin group leader with edit rights on admin profiles), send:
POST /adm_program/modules/profile/two_factor_authentication.php HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Cookie: ADMIDIO_..._SESSION_ID=<testuser_session>
mode=reset&user_uuid=<admin_user_uuid>
Result: the server removes 2FA from the admin account.
- As
testuser, attempt to reset their own 2FA:
POST /adm_program/modules/profile/two_factor_authentication.php HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Cookie: ADMIDIO_..._SESSION_ID=<testuser_session>
mode=reset&user_uuid=<testuser_user_uuid>
Result: SYS_NO_RIGHTS error. The user cannot reset their own 2FA.
This confirms the authorization logic is inverted.
Impact
A group leader (or any user with profile edit rights on an admin) can disable two-factor authentication on administrator accounts. This degrades admin account security to password-only, opening the door to credential stuffing or brute force attacks without a 2FA barrier.
Recommended Fix
Change !== to === on line 84 of modules/profile/two_factor_authentication.php:
// Fixed condition: block non-admins from resetting OTHER users' 2FA
if (!($gCurrentUser->isAdministrator() || $gCurrentUserId === $userId))
{
throw new AdmException('SYS_NO_RIGHTS');
}
Found by aisafe.io
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Composer package | admidio/admidio | < 5.0.9 | 5.0.9 |
References
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L- Weakness (CWE)
CWE-863- Platform
- Composer
- Package
admidio/admidio- Disclosed
- 29.04.2026
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-rh3w-4ccx-prf9 - CC BY 4.0
Vulnerability history: admidio/admidio
All published vulnerabilities of this package (Composer package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 50
- First → latest
- 03.2022 07.2026
- Without a fix
- 1
- Exploited in attacks
- 0
Severity breakdown
- Critical 3
- High 10
- Medium 33
- Low 4
Disclosures per year
- 2022: 3
- 2023: 7
- 2024: 3
- 2025: 1
- 2026: 36
-
Admidio has Inverted 2FA Reset Authorization Check that Lets Group Leaders Strip Admin TOTP this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.