Описание
Admidio Vulnerable to Authenticated SQL Injection in Member Assignment Functionality
Summary
An authenticated SQL injection vulnerability exists in the member assignment data retrieval functionality of Admidio. Any authenticated user with permissions to assign members to a role (such as an administrator) can exploit this vulnerability to execute arbitrary SQL commands. This can lead to a full compromise of the application's database, including reading, modifying, or deleting all data. The vulnerability is present in the latest version, 4.3.16.
Details
The vulnerability is located in the adm_program/modules/groups-roles/members_assignment_data.php script. This script handles an AJAX request to fetch a list of users for role assignment. The filter_rol_uuid GET parameter is not properly sanitized before being used in a raw SQL query.
File: adm_program/modules/groups-roles/members_assignment_data.php
As shown above, the value of $getFilterRoleUuid is directly concatenated into the $filterRoleCondition variable, which is then embedded within a larger SQL query ($sqlSubSelect). This allows an attacker to break out of the string literal and inject arbitrary SQL commands.
PoC (Proof of Concept)
Prerequisites:
- A running instance of Admidio (tested on version 4.3.16).
- An authenticated user session with permissions to assign members to a role (e.g., the default 'admin' user).
Execution:
The vulnerability can be triggered by manipulating the filter_rol_uuid parameter in the request to /adm_program/modules/groups-roles/members_assignment_data.php. Due to the large number of parameters, the easiest way to reproduce this is by capturing a legitimate request and replaying it with sqlmap.
- Log in to Admidio as an administrator.
- Navigate to
Groups / Roles. - Click the "Assign members" icon for any existing role.
- Using a web proxy like Burp Suite, intercept the GET request made to
/adm_program/modules/groups-roles/members_assignment_data.php. - Save the entire raw request to a text file (e.g.,
admidio_request.txt). - Run the following
sqlmapcommand to confirm the time-based blind SQL injection:
Result:
sqlmap will successfully identify and exploit the time-based blind SQL injection vulnerability.
This confirms that an attacker can execute arbitrary SQL queries and extract information from the database.
Пакеты
admidio/admidio
<= 4.3.16
4.3.17
Связанные уязвимости
Admidio is an open-source user management solution. Prior to version 4.3.17, an authenticated SQL injection vulnerability exists in the member assignment data retrieval functionality of Admidio. Any authenticated user with permissions to assign members to a role (such as an administrator) can exploit this vulnerability to execute arbitrary SQL commands. This can lead to a full compromise of the application's database, including reading, modifying, or deleting all data. This issue has been patched in version 4.3.17.