CVE-2025-58745: CWE-94: Improper Control of Generation of Code ('Code Injection') in LabRedesCefetRJ WeGIA
WeGIA is a Web manager for charitable institutions. The fix for CVE-2025-22133 was not enough to remediate the arbitrary file upload vulnerability. The WeGIA only check MIME types for Excel files at endpoint `/html/socio/sistema/controller/controla_xlsx.php`, which can be bypassed by using magic bytes of Excel file in a PHP file. As a result, attacker can upload webshell to the server for remote code execution. Version 3.4.11 contains an updated fix.
AI Analysis
Technical Summary
CVE-2025-58745 is a critical vulnerability affecting versions of the WeGIA web management system for charitable institutions prior to 3.4.11. The vulnerability arises from improper control over code generation, specifically a code injection flaw (CWE-94) combined with an arbitrary file upload issue (CWE-434). The root cause is insufficient validation of uploaded files at the endpoint `/html/socio/sistema/controller/controla_xlsx.php`. WeGIA attempts to restrict uploads to Excel files by checking MIME types; however, this check is bypassable by crafting a PHP file that mimics the magic bytes of an Excel file. This allows an attacker to upload a malicious webshell disguised as an Excel file. Once uploaded, the attacker can execute arbitrary code remotely on the server, leading to full compromise. The vulnerability has a CVSS 3.1 base score of 10.0, indicating critical severity with network attack vector, low attack complexity, requiring privileges but no user interaction, and impacting confidentiality, integrity, and availability with scope change. Although no known exploits are currently reported in the wild, the ease of bypassing MIME checks and the high impact of remote code execution make this a severe threat. The vendor has addressed the issue in version 3.4.11 with an updated fix, but systems running earlier versions remain vulnerable.
Potential Impact
For European organizations using WeGIA to manage charitable or nonprofit operations, this vulnerability poses a significant risk. Successful exploitation can lead to complete server takeover, allowing attackers to steal sensitive donor and beneficiary data, manipulate records, disrupt services, or use the compromised server as a foothold for further network intrusion. Given that WeGIA is specialized software for charitable institutions, the impact includes potential breaches of personal data protected under GDPR, leading to regulatory penalties and reputational damage. Additionally, the ability to execute arbitrary code remotely can facilitate ransomware deployment or lateral movement within organizational networks. The criticality of the vulnerability means that even low-skilled attackers with some privileges could exploit it, increasing the likelihood of compromise. The disruption of charitable services could also affect vulnerable populations relying on these organizations, amplifying the societal impact.
Mitigation Recommendations
Organizations should immediately verify their WeGIA version and upgrade to 3.4.11 or later, where the vulnerability is patched. If upgrading is not immediately possible, implement strict network segmentation to isolate WeGIA servers and restrict access to trusted administrators only. Employ web application firewalls (WAFs) with custom rules to detect and block suspicious file uploads, especially those attempting to disguise PHP files as Excel documents. Conduct thorough input validation beyond MIME type checks, such as verifying file extensions, scanning file contents for embedded PHP code, and using allowlists for file types. Monitor server logs for unusual upload activity or execution of unexpected scripts. Disable unnecessary PHP execution permissions in upload directories to prevent execution of uploaded webshells. Regularly audit user privileges to minimize the number of users with upload or administrative rights. Finally, implement robust incident response plans to quickly contain and remediate any detected exploitation attempts.
Affected Countries
Germany, France, United Kingdom, Netherlands, Belgium, Italy, Spain, Sweden
CVE-2025-58745: CWE-94: Improper Control of Generation of Code ('Code Injection') in LabRedesCefetRJ WeGIA
Description
WeGIA is a Web manager for charitable institutions. The fix for CVE-2025-22133 was not enough to remediate the arbitrary file upload vulnerability. The WeGIA only check MIME types for Excel files at endpoint `/html/socio/sistema/controller/controla_xlsx.php`, which can be bypassed by using magic bytes of Excel file in a PHP file. As a result, attacker can upload webshell to the server for remote code execution. Version 3.4.11 contains an updated fix.
AI-Powered Analysis
Technical Analysis
CVE-2025-58745 is a critical vulnerability affecting versions of the WeGIA web management system for charitable institutions prior to 3.4.11. The vulnerability arises from improper control over code generation, specifically a code injection flaw (CWE-94) combined with an arbitrary file upload issue (CWE-434). The root cause is insufficient validation of uploaded files at the endpoint `/html/socio/sistema/controller/controla_xlsx.php`. WeGIA attempts to restrict uploads to Excel files by checking MIME types; however, this check is bypassable by crafting a PHP file that mimics the magic bytes of an Excel file. This allows an attacker to upload a malicious webshell disguised as an Excel file. Once uploaded, the attacker can execute arbitrary code remotely on the server, leading to full compromise. The vulnerability has a CVSS 3.1 base score of 10.0, indicating critical severity with network attack vector, low attack complexity, requiring privileges but no user interaction, and impacting confidentiality, integrity, and availability with scope change. Although no known exploits are currently reported in the wild, the ease of bypassing MIME checks and the high impact of remote code execution make this a severe threat. The vendor has addressed the issue in version 3.4.11 with an updated fix, but systems running earlier versions remain vulnerable.
Potential Impact
For European organizations using WeGIA to manage charitable or nonprofit operations, this vulnerability poses a significant risk. Successful exploitation can lead to complete server takeover, allowing attackers to steal sensitive donor and beneficiary data, manipulate records, disrupt services, or use the compromised server as a foothold for further network intrusion. Given that WeGIA is specialized software for charitable institutions, the impact includes potential breaches of personal data protected under GDPR, leading to regulatory penalties and reputational damage. Additionally, the ability to execute arbitrary code remotely can facilitate ransomware deployment or lateral movement within organizational networks. The criticality of the vulnerability means that even low-skilled attackers with some privileges could exploit it, increasing the likelihood of compromise. The disruption of charitable services could also affect vulnerable populations relying on these organizations, amplifying the societal impact.
Mitigation Recommendations
Organizations should immediately verify their WeGIA version and upgrade to 3.4.11 or later, where the vulnerability is patched. If upgrading is not immediately possible, implement strict network segmentation to isolate WeGIA servers and restrict access to trusted administrators only. Employ web application firewalls (WAFs) with custom rules to detect and block suspicious file uploads, especially those attempting to disguise PHP files as Excel documents. Conduct thorough input validation beyond MIME type checks, such as verifying file extensions, scanning file contents for embedded PHP code, and using allowlists for file types. Monitor server logs for unusual upload activity or execution of unexpected scripts. Disable unnecessary PHP execution permissions in upload directories to prevent execution of uploaded webshells. Regularly audit user privileges to minimize the number of users with upload or administrative rights. Finally, implement robust incident response plans to quickly contain and remediate any detected exploitation attempts.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2025-09-04T19:18:09.498Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 68bf5ce1d5a2966cfc83ddaa
Added to database: 9/8/2025, 10:46:57 PM
Last enriched: 9/16/2025, 1:08:02 AM
Last updated: 10/29/2025, 9:50:10 AM
Views: 96
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Related Threats
CVE-2025-12450: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in litespeedtech LiteSpeed Cache
MediumCVE-2025-64291: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in Premmerce Premmerce User Roles
UnknownCVE-2025-64290: Cross-Site Request Forgery (CSRF) in Premmerce Premmerce Product Search for WooCommerce
UnknownCVE-2025-64289: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in Premmerce Premmerce Product Search for WooCommerce
UnknownCVE-2025-64286: Cross-Site Request Forgery (CSRF) in WpEstate WP Rentals
UnknownActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.