Skip to content

GHSA-ph84-r98x-2j22 CVE-2026-34384

Admidio has Missing CSRF Protection on Registration Approval Actions

High Packagist
Severity
4.5 / 10
High · CVSS 3.1
Exploit chance (EPSS)
0.18%
Chance of exploitation in the next 30 days. Higher than 7.04% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-352 Cross-Site Request Forgery (CSRF)
Fix
5.0.8
Upgrade admidio/admidio to this version or later

Description

Summary

The create_user, assign_member, and assign_user action modes in modules/registration.php approve pending user registrations via GET request without validating a CSRF token. Unlike the delete_user mode in the same file (which correctly validates the token), these three approval actions read their parameters from $_GET and perform irreversible state changes without any protection. An attacker who has submitted a pending registration can extract their own user UUID from the registration confirmation email URL, then trick any user with the rol_approve_users right into visiting a crafted URL that automatically approves the registration. This bypasses the manual registration approval workflow entirely.

Details

CSRF Protection Is Present for delete_user but Absent for Approval Modes

File: modules/registration.php, lines 90-128

The delete_user mode validates the CSRF token (line 99), but the three approval modes do not:

// assign_member and assign_user: no CSRF check
} elseif (in_array($getMode, array('assign_member', 'assign_user'))) {
    $registrationService = new RegistrationService($gDb, $getUserUUID);
    $message = $registrationService->assignRegistration($getUserUUIDAssigned, $getMode === 'assign_member');
    $gMessage->setForwardUrl($message['forwardUrl']);
    $gMessage->show($message['message']);

// create_user: no CSRF check
} elseif ($getMode === 'create_user') {
    $registrationUser->acceptRegistration();
    if ($gCurrentUser->isAdministratorRoles()) {
        admRedirect(SecurityUtils::encodeUrl(ADMIDIO_URL . FOLDER_MODULES.'/profile/roles.php',
            array('accept_registration' => true, 'user_uuid' => $getUserUUID)));
    }

// delete_user: CSRF IS validated
} elseif ($getMode === 'delete_user') {
    SecurityUtils::validateCsrfToken($_POST['adm_csrf_token']); // <-- protected
    $registrationUser->delete();
}

The three approval modes read both UUIDs exclusively from $_GET (lines 41-43):

The approve action modes accept $_GET parameters user_uuid and user_uuid_assigned without any POST body or CSRF token. Both parameters pass through admFuncVariableIsValid() with uuid type validation, which prevents SQL injection but provides no CSRF protection.

User UUID Is Known to the Attacker from Registration Email

File: D:/bugcrowd/admidio/repo/src/Infrastructure/Service/RegistrationService.php, lines 154-157

When a user submits a registration, Admidio sends a confirmation email containing a URL of the form:

https://TARGET/adm_program/modules/registration.php?id=VALIDATION_ID&user_uuid=REGISTRANT_UUID

The user_uuid in this URL is the registrant's own UUID. The attacker has this UUID because they received the confirmation email for their own registration.

isAdministratorRegistration() Is a Delegated Right

File: D:/bugcrowd/admidio/repo/src/Users/Entity/User.php, lines 1603-1606

public function isAdministratorRegistration(): bool
{
    return $this->checkRolesRight('rol_approve_users');
}

The rol_approve_users right is a delegated organizational privilege, not full system administrator access. Any member designated to review registrations -- for example, a membership secretary or club administrator -- is a valid CSRF victim.

PoC

Scenario: Attacker bypasses manual registration approval

Prerequisites: (1) Manual registration approval is enabled. (2) The attacker submits a registration form and receives a confirmation email with their user_uuid. (3) After clicking the confirmation link, their registration enters the pending queue.

Step 1: Attacker extracts their own user_uuid from the registration email

The confirmation email contains a link of the form:

https://TARGET/adm_program/modules/registration.php?id=VALIDATION_ID&user_uuid=ATTACKER_UUID

The ATTACKER_UUID is visible to the attacker from their own email.

Step 2: CSRF auto-approval via image tag

The attacker hosts a page that the victim (admin with rol_approve_users right) visits:

<img src="https://TARGET/adm_program/modules/registration.php?mode=create_user&user_uuid=ATTACKER_UUID" width="1" height="1">

When the victim loads this page, Admidio silently accepts the attacker registration and assigns default organization roles. No confirmation or token is required.

Step 3: Force-assign registration to an existing account (account takeover)

If the attacker knows the UUID of an existing member (obtainable from profile page URLs when the user list is visible) and has a pending registration:

<img src="https://TARGET/adm_program/modules/registration.php?mode=assign_user&user_uuid=ATTACKER_REG_UUID&user_uuid_assigned=EXISTING_USER_UUID" width="1" height="1">

This merges the pending registration into the existing account, replacing that account login credentials with the attacker credentials.

Impact

  • Manual Approval Bypass: An attacker with a pending registration can force auto-approval without waiting for an administrator to manually review it. This grants them organization membership, including access to events, documents, mailing lists, and other role-restricted features.
  • Account Takeover via assign_user CSRF: If the attacker knows any member UUID (visible in profile page URLs), the assign_user mode merges the attacker registration into that member account, replacing the existing member login with the attacker credentials. This is a full account takeover requiring only that the victim admin visit a crafted URL.
  • Low Attack Complexity: The attacker only needs their own registration email to get their UUID. The CSRF payload is a plain GET request via an image tag -- no JavaScript required.
  • Delegated Right: The required victim right (rol_approve_users) is a common delegation target in organizations with membership approval workflows.

Recommended Fix

Add SecurityUtils::validateCsrfToken($_POST["adm_csrf_token"]) at the beginning of each approval action, consistent with how delete_user is already protected in the same file.

// File: modules/registration.php

} elseif (in_array($getMode, array('assign_member', 'assign_user'))) {
    // ADD: validate CSRF token
    SecurityUtils::validateCsrfToken($_POST['adm_csrf_token']);
    $registrationService = new RegistrationService($gDb, $getUserUUID);
    $message = $registrationService->assignRegistration($getUserUUIDAssigned, $getMode === 'assign_member');
    ...

} elseif ($getMode === 'create_user') {
    // ADD: validate CSRF token
    SecurityUtils::validateCsrfToken($_POST['adm_csrf_token']);
    $registrationUser->acceptRegistration();
    ...

} elseif ($getMode === 'delete_user') {
    SecurityUtils::validateCsrfToken($_POST['adm_csrf_token']); // already protected
    $registrationUser->delete();
}

Additionally, convert the approval action URLs from GET-based links to POST-form buttons (with the CSRF token in a hidden field). The existing delete_user button uses callUrlHideElement() which already sends the token in the POST body -- use the same pattern for approval buttons.

Affected versions

Packagist

PackageVulnerableFixed in
admidio/admidio
< 5.0.8
5.0.8

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

admidio/admidio Packagist → 5.0.8

composer
composer require admidio/admidio:^5.0.8

Severity breakdown

CVSS 3.1 4.5

CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:N/I:H/A:N

Attack vector
Network
Attack complexity
Low
Privileges required
High
User interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
None

Weakness

CWE-352: Cross-Site Request Forgery (CSRF)

The web application does not, or cannot, sufficiently verify whether a request was intentionally provided by the user who sent the request, which could have originated from an unauthorized actor.

How to prevent it
  • Architecture and Design: Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid [REF-1482]. For example, use anti-CSRF packages such as the OWASP CSRFGuard. [REF-330] Another example is the ESAPI Session Management control, which includes a component for CSRF. [REF-45]
  • Implementation: Ensure that the application is free of cross-site scripting issues (CWE-79), because most CSRF defenses can be bypassed using attacker-controlled script.
  • Architecture and Design: Generate a unique nonce for each form, place the nonce into the form, and verify the nonce upon receipt of the form. Be sure that the nonce is not predictable (CWE-330). [REF-332]
  • Architecture and Design: Identify especially dangerous operations. When the user performs a dangerous operation, send a separate confirmation request to ensure that the user intended to perform that operation.
  • Architecture and Design: Use the "double-submitted cookie" method as described by Felten and Zeller: When a user visits a site, the site should generate a pseudorandom value and set it as a cookie on the user's machine. The site should require every form submission to include this value as a form value and also as a cookie value. When a POST request is sent to the site, the request should only be considered valid if the form value and the cookie value are the same. Because of the same-origin policy, an attacker cannot read or modify the value stored in the cookie. To successfully submit a form on behalf of the user, the attacker would have to correctly guess the pseudorandom value. If the pseudorandom value is cryptographically strong, this will be prohibitively difficult. This technique requires Javascript, so it may not work for browsers that have Javascript disabled. [REF-331]
  • Architecture and Design: Do not use the GET method for any request that triggers a state change.
  • Implementation: Check the HTTP Referer header to see if the request originated from an expected page. This could break legitimate functionality, because users or proxies may have disabled sending the Referer for privacy reasons.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-hm42-q32m-vj4f
Admidio: CSRF on Plugin Install, Uninstall, and Update via Unprotected GET Requests
Medium Also affects admidio/admidio
GHSA-xw54-c3mx-9pm3
Admidio: Any logged-in user can delete inventory fields via `mode=field_delete` — incomplete fix of #2024
Medium Also affects admidio/admidio
GHSA-mch8-wf3h-6x88
Admidio writes session IDs and auto-login cookie values to application logs
Medium Also affects admidio/admidio
GHSA-4rgq-38mh-9xqg
Admidio PKCS#12 private key export action lacks CSRF protection
Medium Also affects admidio/admidio
GHSA-x628-457g-2pw9
Admidio has IDOR in `documents-files.php` `mode=move_save` that lets any folder-uploader exfiltrate files from private folders
High Also affects admidio/admidio
GHSA-q6w3-hpfv-rg36
Admidio: IDOR in documents-files.php allows cross-folder file rename and description changes by unauthorized uploaders
Medium Also affects admidio/admidio
GHSA-xg76-5qj2-2hhv
Admidio: CSRF in SSO client `enable` action toggles SAML/OIDC clients without token validation
Medium Also affects admidio/admidio
GHSA-mx25-j3rc-6w2w
Admidio's CSRF in registration `send_login` mode resets arbitrary user passwords
Medium Also affects admidio/admidio
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor