CVE-2026-41660: Admidio/admidio Admidio Has Inverted 2FA Reset Vulnerability

HIGH
Advisory Identifier: GHSA-rh3w-4ccx-prf9
CVSS 7.1
CWE-863
Published
Advisory Summary

CVE-2026-41660 is a HIGH (CVSS 7.1) admidio has inverted 2fa reset vulnerability (CWE-863: Incorrect Authorization) affecting Admidio/admidio libraries in the Packagist ecosystem. The issue involves admidio has inverted 2fa reset authorization check that lets group leaders strip admin totp. Remediation is available by upgrading affected packages to version 5.0.9.

CVE-2026-41660 at a Glance

CVE Identifier CVE-2026-41660
GHSA Identifier GHSA-rh3w-4ccx-prf9
Severity HIGH
CVSS v3.1 Base Score 7.1
CWE Classification CWE-863: Incorrect Authorization
Affected Product Admidio/admidio
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 7.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity High (I:H)
Availability Low (A:L)

How to Fix CVE-2026-41660

To remediate this vulnerability, upgrade all affected Admidio/admidio dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

admidio/admidio fixed: 5.0.9
Upgrade admidio/admidio to 5.0.9
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for admidio/admidio

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-41660, inspect your project dependencies for Admidio/admidio:

inspect dependencies for admidio/admidio

Analyze the terminal output to locate any version of Admidio/admidio in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.0.9), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-863: Incorrect Authorization, where the product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. In Admidio/admidio, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## 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: ```php // 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 1. As `testuser` (a non-admin group leader with edit rights on admin profiles), send: ```http 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. 2. As `testuser`, attempt to reset their own 2FA: ```http 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`: ```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](https://aisafe.io)*

CVE-2026-41660 Affected Admidio/admidio Versions

1 component(s)
Fixed Versions:
5.0.9
Product / Package Ecosystem Affected Versions Fixed Version
admidio/admidio
Packagist
< 5.0.9
5.0.9

References

Frequently Asked Questions

What is CVE-2026-41660?
CVE-2026-41660 is a security vulnerability in Admidio/admidio involving Admidio has Inverted 2FA Reset Authorization Check that Lets Group Leaders Strip Admin TOTP under CWE-863: Incorrect Authorization.
Which Admidio/admidio versions are affected?
Affected versions include releases prior to 5.0.9 across affected packages: admidio/admidio.
What version fixes CVE-2026-41660?
Upgrading to 5.0.9 (or the latest patched release for your respective branch) resolves the vulnerability.
Is admidio/admidio affected?
Yes, admidio/admidio is affected in releases prior to 5.0.9. Upgrade your dependency to 5.0.9 or later.
What is the CVSS score of CVE-2026-41660?
CVE-2026-41660 has a CVSS v3.1 base score of 7.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L.
What CWE is associated with CVE-2026-41660?
CVE-2026-41660 is classified under CWE-863: Incorrect Authorization (The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check.).
How can I check Packagist dependencies for CVE-2026-41660?
Run the dependency tree command: 'inspect dependencies for admidio/admidio'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-rh3w-4ccx-prf9",
  "modified" : "2026-05-08T19:55:40Z",
  "published" : "2026-04-29T21:49:24Z",
  "aliases" : [ "CVE-2026-41660" ],
  "summary" : "Admidio has Inverted 2FA Reset Authorization Check that Lets Group Leaders Strip Admin TOTP",
  "details" : "## Summary\n\nA 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.\n\n## Details\n\nIn `modules/profile/two_factor_authentication.php` at line 84, the authorization check uses an inverted condition:\n\n```php\n// modules/profile/two_factor_authentication.php line 84\nif (!($gCurrentUser->isAdministrator() || $gCurrentUserId !== $userId))\n{\n    throw new AdmException('SYS_NO_RIGHTS');\n}\n```\n\nBy De Morgan's law, this condition evaluates as:\n- Blocks when: `NOT isAdministrator() AND $gCurrentUserId === $userId`\n- In practice: blocks non-admins from resetting their OWN 2FA\n- Passes: non-admins resetting OTHER users' 2FA (the opposite of the intended behavior)\n\nThe intended logic should block non-admins from resetting other users' 2FA. The `!==` operator on line 84 should be `===`.\n\nA 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.\n\n## Proof of Concept\n\n1. As `testuser` (a non-admin group leader with edit rights on admin profiles), send:\n\n```http\nPOST /adm_program/modules/profile/two_factor_authentication.php HTTP/1.1\nContent-Type: application/x-www-form-urlencoded\nCookie: ADMIDIO_..._SESSION_ID=<testuser_session>\n\nmode=reset&user_uuid=<admin_user_uuid>\n```\n\nResult: the server removes 2FA from the admin account.\n\n2. As `testuser`, attempt to reset their own 2FA:\n\n```http\nPOST /adm_program/modules/profile/two_factor_authentication.php HTTP/1.1\nContent-Type: application/x-www-form-urlencoded\nCookie: ADMIDIO_..._SESSION_ID=<testuser_session>\n\nmode=reset&user_uuid=<testuser_user_uuid>\n```\n\nResult: `SYS_NO_RIGHTS` error. The user cannot reset their own 2FA.\n\nThis confirms the authorization logic is inverted.\n\n## Impact\n\nA 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.\n\n## Recommended Fix\n\nChange `!==` to `===` on line 84 of `modules/profile/two_factor_authentication.php`:\n\n```php\n// Fixed condition: block non-admins from resetting OTHER users' 2FA\nif (!($gCurrentUser->isAdministrator() || $gCurrentUserId === $userId))\n{\n    throw new AdmException('SYS_NO_RIGHTS');\n}\n```\n\n---\n*Found by [aisafe.io](https://aisafe.io)*",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "admidio/admidio"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "5.0.9"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 5.0.8"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/Admidio/admidio/security/advisories/GHSA-rh3w-4ccx-prf9"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-41660"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/Admidio/admidio"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Admidio/admidio/releases/tag/v5.0.9"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-863" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-29T21:49:24Z",
    "nvd_published_at" : "2026-05-07T04:16:29Z"
  }
}