CVE-2025-58159·PHP vulnerability
WeGIA is a Web manager for charitable institutions. Prior to version 3.4.11, a remote code execution vulnerability was identified, caused by improper validation of uploaded files. The application allows an attacker to upload files with arbitrary filenames, including those with a .php extension. Because the uploaded file is written directly to disk without adequate sanitization or extension restrictions, a spreadsheet file followed by PHP code can be uploaded and executed on the server, leading to arbitrary code execution. This is due to insufficient mitigation of CVE-2025-22133. This issue has been patched in version 3.4.11.
- Severity
- critical
- Software
- PHP
- Fixed in
- 3.4.11
- Published
- 2025-08-29
Affected versions
Until: 3.4.11
Fixed in: 3.4.11
How to fix this CVE
Upgrade WeGIA to version 3.4.11 or later to patch the file upload validation bypass that allows arbitrary PHP file execution. This update implements proper file extension restrictions and sanitization to prevent attackers from uploading executable files disguised as spreadsheets. Organizations running earlier versions should prioritize this update to eliminate remote code execution risks on their web servers.
sudo dnf update phpDefensia detects this vulnerability
What an exploitation attempt looks like
Sample log line indicative of exploitation attempts:
POST requests to upload endpoints with Content-Disposition headers containing filenames ending in .php, .phtml, or .phar; or multipart form data with executable extensions disguised within archive or spreadsheet MIME types (application/vnd.ms-excel, application/zip) but with PHP extensions in the actual filenameWAF mitigation (if patching is not yet possible)
Add this rule to your WAF to block exploitation attempts while you schedule the patch.
Block HTTP POST/PUT requests to file upload endpoints where the filename parameter contains double extensions (e.g., .xls.php, .csv.php) or executable extensions (.php, .phtml, .php3, .php4, .php5, .phar). Implement Content-Type validation to reject uploads that claim to be spreadsheets but contain PHP code patterns.How to check if you are affected
- Check installed PHP version: php -v
- Verify WeGIA installation location: find / -name 'WeGIA*' -type d 2>/dev/null | head -5
- Search web server logs for suspicious file uploads: grep -i 'upload' /var/log/apache2/access.log | grep -E '\.(php|phtml|php3|php4|php5|phar)'
- Confirm patch applied by checking WeGIA version in installation directory or admin panel, then verify PHP version matches or exceeds the patched release
FAQ
What is CVE-2025-58159?
CVE-2025-58159 is a critical remote code execution vulnerability in WeGIA (a web management system for charitable institutions) that allows authenticated attackers to bypass file upload validation and execute arbitrary PHP code by uploading files with .php extensions.
Is CVE-2025-58159 being actively exploited?
No, this vulnerability is not listed as actively exploited by CISA, and no public exploits are currently available, though organizations should still patch immediately given the critical severity and ease of exploitation.
What versions of WeGIA are affected by CVE-2025-58159?
All versions of WeGIA prior to 3.4.11 are vulnerable. Version 3.4.11 and later contain the remediation.
How do I check if my server is vulnerable to CVE-2025-58159?
Identify the WeGIA installation with find / -name 'WeGIA*' -type d, then check the version number in the installation directory or admin panel. If the version is below 3.4.11, your system is vulnerable.
Does Defensia detect CVE-2025-58159?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If WeGIA is installed on a monitored server, CVE-2025-58159 will appear in your dashboard with remediation steps.
Related PHP CVEs
References
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2025-58159. Free for 1 server.
Get started free