CVE-2026-32756: Admidio/admidio Remote Code Execution Vulnerability

HIGH
Advisory Identifier: GHSA-95cq-p4w2-32w5
CVSS 8.8
CWE-434
Published
Advisory Summary

CVE-2026-32756 is a HIGH (CVSS 8.8) remote code execution vulnerability (CWE-434: Unrestricted Upload of File with Dangerous Type) affecting Admidio/admidio libraries in the Packagist ecosystem. The issue involves file upload(rce) vulnerability in admidio. Remediation is available by upgrading affected packages to version 5.0.7.

CVE-2026-32756 at a Glance

CVE Identifier CVE-2026-32756
GHSA Identifier GHSA-95cq-p4w2-32w5
Severity HIGH
CVSS v3.1 Base Score 8.8
CWE Classification CWE-434: Unrestricted Upload of File with Dangerous Type
Affected Product Admidio/admidio
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 8.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-32756

To remediate this vulnerability, upgrade all affected Admidio/admidio dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

admidio/admidio fixed: 5.0.7
Upgrade admidio/admidio to 5.0.7
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for admidio/admidio

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-32756, inspect your project dependencies for Admidio/admidio:

inspect dependencies for admidio/admidio

Analyze the terminal output to locate any version of Admidio/admidio in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.0.7), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-434: Unrestricted Upload of File with Dangerous Type, where the product allows the upload or transfer of dangerous file types that are automatically processed within its environment. In Admidio/admidio, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### **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: - `handle_form_data($file, $index)` — Validates the CSRF token. On failure, it sets `$file->error` and returns. The request is **not** terminated. - `handle_file_upload(...)` — Calls `parent::handle_file_upload()` 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**: `handle_form_data()` does not set an error → extension check runs → invalid extension causes the uploaded file to be deleted from disk. - **Invalid CSRF token**: `handle_form_data()` sets `$file->error` → the `if (!isset($file->error))` guard in `handle_file_upload()` 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::handle_file_upload($uploaded_file, $name, $size, $type, $error, $index, $content_range); if (!isset($file->error)) { // Extension validation is only reached when no prior error is set. // If CSRF validation failed in handle_form_data(), this block is skipped // and the uploaded file is never cleaned up from disk. if (!$newFile->allowedFileExtension()) { throw new Exception('SYS_FILE_EXTENSION_INVALID'); } } ``` ### **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/file_upload.php?module=documents_files&mode=upload_files&uuid=<folder_uuid>` using a proxy tool such as Burp Suite. 4. Replace the value of the `adm_csrf_token` 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.

CVE-2026-32756 Affected Admidio/admidio Versions

1 component(s)
Fixed Versions:
5.0.7
Product / Package Ecosystem Affected Versions Fixed Version
admidio/admidio
Packagist
< 5.0.7
5.0.7

References

Frequently Asked Questions

What is CVE-2026-32756?
CVE-2026-32756 is a security vulnerability in Admidio/admidio involving File Upload(RCE) Vulnerability in admidio under CWE-434: Unrestricted Upload of File with Dangerous Type.
Which Admidio/admidio versions are affected?
Affected versions include releases prior to 5.0.7 across affected packages: admidio/admidio.
What version fixes CVE-2026-32756?
Upgrading to 5.0.7 (or the latest patched release for your respective branch) resolves the vulnerability.
Is admidio/admidio affected?
Yes, admidio/admidio is affected in releases prior to 5.0.7. Upgrade your dependency to 5.0.7 or later.
What is the CVSS score of CVE-2026-32756?
CVE-2026-32756 has a CVSS v3.1 base score of 8.8 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2026-32756?
CVE-2026-32756 is classified under CWE-434: Unrestricted Upload of File with Dangerous Type (The product allows the upload or transfer of dangerous file types that are automatically processed within its environment.).
How can I check Packagist dependencies for CVE-2026-32756?
Run the dependency tree command: 'inspect dependencies for admidio/admidio'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-95cq-p4w2-32w5",
  "modified" : "2026-03-20T21:15:25Z",
  "published" : "2026-03-16T21:16:50Z",
  "aliases" : [ "CVE-2026-32756" ],
  "summary" : "File Upload(RCE) Vulnerability in admidio",
  "details" : "### **Summary**\n\nA 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.\n\n### **Details**\n\n**1. Critical - Unrestricted File Upload leading to Remote Code Execution (RCE)**\n\n**Root Cause Analysis:**\n\nThe root cause lies in a design flaw in `src/Infrastructure/Plugins/UploadHandlerFile.php`. The `UploadHandlerFile` class overrides two methods from its parent `UploadHandler` class:\n\n- `handle_form_data($file, $index)` — Validates the CSRF token. On failure, it sets `$file->error` and returns. The request is **not** terminated.\n- `handle_file_upload(...)` — Calls `parent::handle_file_upload()` to physically write the file to disk, then checks `if (!isset($file->error))` before running file extension validation (`allowedFileExtension()`).\n\nThe execution flow differs based on whether the CSRF token is valid:\n\n- **Valid CSRF token**: `handle_form_data()` does not set an error → extension check runs → invalid extension causes the uploaded file to be deleted from disk.\n- **Invalid CSRF token**: `handle_form_data()` sets `$file->error` → the `if (!isset($file->error))` guard in `handle_file_upload()` 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.\n\nIn 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.\n\n**Affected code** (`src/Infrastructure/Plugins/UploadHandlerFile.php`):\n\n```php\n// File is physically saved to disk here, before any Admidio-specific checks\n$file = parent::handle_file_upload($uploaded_file, $name, $size, $type, $error, $index, $content_range);\n\nif (!isset($file->error)) {\n    // Extension validation is only reached when no prior error is set.\n    // If CSRF validation failed in handle_form_data(), this block is skipped\n    // and the uploaded file is never cleaned up from disk.\n    if (!$newFile->allowedFileExtension()) {\n        throw new Exception('SYS_FILE_EXTENSION_INVALID');\n    }\n}\n```\n\n### **PoC**\n\nDocuments & Files Create folder\n<img width=\"762\" height=\"729\" alt=\"image\" src=\"https://github.com/user-attachments/assets/2c927482-851b-4945-93d6-6e7a1e3bc21f\" />\n\n<img width=\"749\" height=\"690\" alt=\"image\" src=\"https://github.com/user-attachments/assets/72443c87-e15f-4312-9659-8cd0661a4dae\" />\n\n\nFile Upload Try 1-1 (before request)\n<img width=\"1856\" height=\"635\" alt=\"image\" src=\"https://github.com/user-attachments/assets/d1ffaa12-aec1-45ff-a612-885d9554fb60\" />\n\n\nFile Upload Try 1-2 (after request)\n<img width=\"1850\" height=\"855\" alt=\"image\" src=\"https://github.com/user-attachments/assets/4ece4aac-1255-4189-9048-45ff3df4abcf\" />\n\n\n\nFile Upload Try 1-3 (After changing CSRF to a test value, request → PHP file upload succeeds)\n<img width=\"1847\" height=\"928\" alt=\"image\" src=\"https://github.com/user-attachments/assets/63f9d108-5e4f-4d32-96d2-09f9ad910873\" />\n\n\n✅ rcepoc.php Upload Success!\n<img width=\"926\" height=\"814\" alt=\"image\" src=\"https://github.com/user-attachments/assets/4de99c31-dc3c-44f2-9936-19c3da0dfffb\" />\n\n\nAccess the rcepoc upload path confirmed in the response and check the web shell.\n<img width=\"1635\" height=\"922\" alt=\"image\" src=\"https://github.com/user-attachments/assets/0b770caf-e737-4cbd-97b9-ae191a8b79f5\" />\n\n\n🆗 WebShell Success\n<img width=\"685\" height=\"187\" alt=\"image\" src=\"https://github.com/user-attachments/assets/e90f162b-7949-41c4-9fd1-aad3b6365adf\" />\n\n<img width=\"794\" height=\"209\" alt=\"image\" src=\"https://github.com/user-attachments/assets/f45dae74-a830-4761-af31-f2ac28eb2586\" />\n\n\n**Steps to Reproduce:**\n\n1. Log in to Admidio as an authenticated user with upload permissions on the Documents & Files module.\n2. Navigate to a folder in the Documents & Files module and open the file upload dialog.\n3. Intercept the upload POST request to `/system/file_upload.php?module=documents_files&mode=upload_files&uuid=<folder_uuid>` using a proxy tool such as Burp Suite.\n4. Replace the value of the `adm_csrf_token` field with an arbitrary invalid string (e.g., `webshellgogo`).\n5. Set the file to be uploaded to a PHP webshell (e.g., `<?php system($_GET[1]); ?>`).\n6. Forward the modified request.\n7. 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.\n8. Access the uploaded PHP file directly via the URL provided in the response — arbitrary command execution is confirmed.\n\n### **Impact**\n\n- An authenticated attacker with upload permissions can bypass file extension validation and upload arbitrary server-side scripts such as PHP webshells.\n- This leads to Remote Code Execution (RCE), potentially resulting in full server compromise, sensitive data exfiltration, and lateral movement.\n- 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.\n\n### **Remediation Measures**\n\n- 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.\n- 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`).\n- 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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "admidio/admidio"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "5.0.7"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 5.0.6"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/Admidio/admidio/security/advisories/GHSA-95cq-p4w2-32w5"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-32756"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/Admidio/admidio"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Admidio/admidio/releases/tag/v5.0.7"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-434" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-16T21:16:50Z",
    "nvd_published_at" : "2026-03-20T00:16:16Z"
  }
}