CVE-2025-26605 Overview
CVE-2025-26605 is a SQL injection vulnerability [CWE-89] in WeGIA, an open source Web Manager for Institutions targeting Portuguese-speaking users. The flaw resides in the deletar_cargo.php endpoint, where unsanitized input flows into a SQL query. An authenticated attacker can execute arbitrary SQL queries against the backend database. The maintainers fixed the issue in version 3.2.13, and no workarounds exist for unpatched deployments.
Critical Impact
An authenticated attacker can read, modify, or destroy sensitive database contents through the deletar_cargo.php endpoint, compromising confidentiality, integrity, and availability of the WeGIA instance.
Affected Products
- WeGIA versions prior to 3.2.13
- LabRedesCefetRJ WeGIA Web Manager
- Institutions using WeGIA for Portuguese-language operations management
Discovery Timeline
- 2025-02-18 - CVE-2025-26605 published to NVD
- 2025-04-10 - Last updated in NVD database
Technical Details for CVE-2025-26605
Vulnerability Analysis
The vulnerability resides in the deletar_cargo.php endpoint of the WeGIA application. This endpoint handles deletion of job roles (cargo in Portuguese) and accepts user-supplied parameters that are concatenated into a SQL query without proper sanitization or parameterization. An attacker with valid authentication credentials can inject arbitrary SQL syntax through the vulnerable parameter.
Successful exploitation grants the attacker the ability to execute arbitrary SQL queries with the privileges of the application's database user. This typically includes reading sensitive data, modifying records, escalating privileges within the application, and in some configurations, executing operating system commands through database-specific features. The vulnerability is classified under [CWE-89] (Improper Neutralization of Special Elements used in an SQL Command).
Root Cause
The root cause is the direct concatenation of attacker-controlled input into SQL statements within deletar_cargo.php. The endpoint fails to use prepared statements or parameterized queries, which are the standard defense against SQL injection in PHP applications using PDO or mysqli.
Attack Vector
The attack is delivered over the network against the HTTP interface of a WeGIA deployment. The attacker must hold valid low-privilege credentials to reach the authenticated deletar_cargo.php endpoint. Once authenticated, the attacker submits crafted parameters containing SQL syntax to manipulate the query logic. See the GitHub Security Advisory GHSA-6gv7-4j8g-cvgp for advisory details.
Detection Methods for CVE-2025-26605
Indicators of Compromise
- HTTP POST or GET requests to deletar_cargo.php containing SQL metacharacters such as single quotes, UNION, SELECT, --, or /* in parameter values.
- Unexpected database errors recorded in PHP or web server logs originating from the deletar_cargo.php handler.
- Database audit log entries showing queries against system tables (information_schema, mysql.user) from the WeGIA application account.
- Sudden spikes in row deletions or schema enumeration queries from the application database user.
Detection Strategies
- Deploy web application firewall rules that flag SQL injection patterns targeting the /html/cargo/deletar_cargo.php URL path.
- Enable database query logging and alert on queries containing UNION SELECT, stacked statements, or comment sequences from the WeGIA service account.
- Correlate authenticated session activity with anomalous query volume against cargo-related tables.
Monitoring Recommendations
- Forward web server access logs and PHP error logs to a centralized analytics platform for query-pattern analysis.
- Monitor authentication logs for low-privilege accounts performing administrative endpoint access, which is required to reach deletar_cargo.php.
- Track outbound connections from the WeGIA host to detect post-exploitation data exfiltration attempts.
How to Mitigate CVE-2025-26605
Immediate Actions Required
- Upgrade WeGIA to version 3.2.13 or later, which contains the official fix.
- Audit existing user accounts and revoke unused credentials to reduce the pool of authenticated actors that can reach the vulnerable endpoint.
- Review database logs and application logs since deployment for evidence of prior exploitation attempts.
- Rotate database credentials and application session secrets if compromise is suspected.
Patch Information
The WeGIA maintainers released version 3.2.13 to address this vulnerability. The patch introduces parameterized queries in the deletar_cargo.php endpoint, eliminating the unsafe concatenation of user input into SQL statements. Refer to the GitHub Security Advisory GHSA-6gv7-4j8g-cvgp for release notes.
Workarounds
- No official workarounds exist; the vendor advisory states upgrading is the only remediation.
- As a compensating control, restrict network access to the WeGIA application to trusted administrative networks until the patch is applied.
- Apply a web application firewall ruleset that blocks SQL metacharacters in requests to deletar_cargo.php as a temporary mitigation.
# Upgrade WeGIA to the patched release
git fetch --tags
git checkout v3.2.13
# Restart the PHP-FPM and web server processes after deployment
sudo systemctl restart php-fpm
sudo systemctl restart nginx
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

