CVE-2024-38529·PHP vulnerability
Admidio is a free, open source user management system for websites of organizations and groups. In Admidio before version 4.3.10, there is a Remote Code Execution Vulnerability 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}`. 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. This vulnerability is fixed in 4.3.10.
- Severity
- critical
- Software
- PHP
- Fixed in
- 4.3.10
- Published
- 2024-07-29
Affected versions
Until: 4.3.10
Fixed in: 4.3.10
How to fix this CVE
Upgrade Admidio to version 4.3.10 or later to patch the file upload validation flaw in the Message module. This update implements proper file extension filtering to prevent PHP and other executable files from being uploaded as message attachments. If you cannot upgrade immediately, restrict web server access to the adm_my_files/messages_attachments directory through your web server configuration or WAF rules.
sudo dnf update php php-common php-cli php-fpm -yDefensia detects this vulnerability
What an exploitation attempt looks like
Sample log line indicative of exploitation attempts:
POST /admidio/index.php?page=messages.*upload|GET /adm_my_files/messages_attachments/[a-zA-Z0-9_-]+\.(php|phtml|php[345]|pht)WAF mitigation (if patching is not yet possible)
Add this rule to your WAF to block exploitation attempts while you schedule the patch.
Block POST requests to message upload endpoints with Content-Type application/x-php or file parameters containing .php extensions. Deny all GET requests to /adm_my_files/messages_attachments/ that end with executable file extensions (.php, .phtml, .php3, .php4, .php5, .pht, .phps). Implement whitelist-based file type validation requiring only approved document extensions (pdf, doc, docx, jpg, png, txt).How to check if you are affected
- Check the installed Admidio version: grep -r "ADMIDIO_VERSION" /path/to/admidio/config/ 2>/dev/null | head -1
- List all files in the messages_attachments directory: find /path/to/admidio/adm_my_files/messages_attachments -type f -name '*.php' -o -name '*.phtml' -o -name '*.php3' -o -name '*.php4' -o -name '*.php5'
- Search web server access logs for requests to adm_my_files/messages_attachments followed by PHP execution attempts: grep -E 'messages_attachments.*\.(php|phtml|php[345])' /var/log/apache2/access.log /var/log/nginx/access.log 2>/dev/null
- Verify the fix by checking if file upload validation is enforced: grep -r 'ALLOWED.*EXTENSION\|file.*type.*check' /path/to/admidio/ 2>/dev/null | grep -i message
Indicators of compromise
- POST requests to Admidio message upload functionality with PHP file payloads
- GET requests accessing PHP files in /adm_my_files/messages_attachments/ directory
- User-Agent patterns associated with automated exploitation frameworks attempting file uploads
FAQ
What is CVE-2024-38529?
CVE-2024-38529 is a critical remote code execution vulnerability in Admidio's Message module that allows authenticated users to upload executable PHP files as message attachments. These files become publicly accessible and can be executed by the web server, enabling attackers to gain full control of the application.
Is CVE-2024-38529 being actively exploited?
This vulnerability is not currently listed on the CISA Known Exploited Vulnerabilities (KEV) catalog and no public exploits have been disclosed, but the critical severity and ease of exploitation make it a high-priority patch target.
What versions of PHP are affected by CVE-2024-38529?
This vulnerability affects Admidio versions prior to 4.3.10. All PHP versions running affected Admidio instances are at risk, regardless of PHP version.
How do I check if my server is vulnerable to CVE-2024-38529?
Run: grep -r 'ADMIDIO_VERSION' /path/to/admidio/config/ and verify the version is 4.3.10 or later. Additionally, check for suspicious PHP files in the adm_my_files/messages_attachments directory using: find /path/to/admidio/adm_my_files/messages_attachments -name '*.php*'
Does Defensia detect CVE-2024-38529?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Admidio is running on a monitored server, CVE-2024-38529 will appear in your dashboard with remediation steps and version verification details.
Related PHP CVEs
References
- https://github.com/Admidio/admidio/commit/3b1cc1cda05747edebe15f2825b79bc5a673d94c
- https://github.com/Admidio/admidio/security/advisories/GHSA-g872-jwwr-vggm
- https://github.com/Admidio/admidio/commit/3b1cc1cda05747edebe15f2825b79bc5a673d94c
- https://github.com/Admidio/admidio/security/advisories/GHSA-g872-jwwr-vggm
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2024-38529. Free for 1 server.
Get started free