CVE-2025-30364

9.8 CRITICAL

📋 TL;DR

A SQL injection vulnerability in WeGIA versions before 3.2.8 allows attackers to execute arbitrary SQL commands through the id_funcionario parameter in the /WeGIA/html/funcionario/remuneracao.php endpoint. This can lead to data theft, manipulation, or complete system compromise. All organizations using vulnerable WeGIA versions are affected.

💻 Affected Systems

Products:
  • WeGIA
Versions: All versions prior to 3.2.8
Operating Systems: Any OS running WeGIA (typically Linux)
Default Config Vulnerable: ⚠️ Yes
Notes: Affects all installations with the vulnerable endpoint accessible; no special configuration required for exploitation.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise including exfiltration of sensitive donor/beneficiary data, financial records, and administrative credentials; potential for full system takeover via command execution.

🟠

Likely Case

Data exfiltration of sensitive information including personal identifiable information, financial records, and organizational data; potential for data manipulation or deletion.

🟢

If Mitigated

Limited impact with proper input validation, parameterized queries, and network segmentation; potential for detection and blocking of malicious requests.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

SQL injection vulnerabilities are commonly exploited; the advisory provides enough detail for attackers to craft exploits.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 3.2.8

Vendor Advisory: https://github.com/LabRedesCefetRJ/WeGIA/security/advisories/GHSA-x3ff-5qp7-43qv

Restart Required: Yes

Instructions:

1. Backup your current WeGIA installation and database. 2. Download version 3.2.8 from the official repository. 3. Replace the vulnerable files with the patched version. 4. Restart the web server service. 5. Verify the fix by testing the vulnerable endpoint.

🔧 Temporary Workarounds

Web Application Firewall (WAF) Rules

all

Implement WAF rules to block SQL injection patterns targeting the id_funcionario parameter

# Example ModSecurity rule: SecRule ARGS:id_funcionario "@detectSQLi" "id:1001,phase:2,deny,status:403"

Input Validation Filter

all

Add server-side validation to only accept numeric values for id_funcionario parameter

# PHP example: if(!is_numeric($_GET['id_funcionario'])) { die('Invalid input'); }

🧯 If You Can't Patch

  • Implement strict network segmentation to isolate the WeGIA server from sensitive systems
  • Deploy a web application firewall with SQL injection detection rules

🔍 How to Verify

Check if Vulnerable:

Test the endpoint /WeGIA/html/funcionario/remuneracao.php?id_funcionario=1' with SQL injection payloads and observe error responses or unexpected behavior

Check Version:

Check the WeGIA version in the application interface or configuration files

Verify Fix Applied:

After patching, test the same endpoint with SQL injection payloads and verify proper error handling or rejection of malicious input

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL error messages in web server logs
  • Multiple requests to /WeGIA/html/funcionario/remuneracao.php with special characters in parameters
  • Requests containing SQL keywords like UNION, SELECT, INSERT in id_funcionario parameter

Network Indicators:

  • Unusual traffic patterns to the vulnerable endpoint
  • Requests with SQL injection payloads in URL parameters

SIEM Query:

source="web_server" AND uri="/WeGIA/html/funcionario/remuneracao.php" AND (param="*id_funcionario*" AND value="*'*" OR value="*UNION*" OR value="*SELECT*" OR value="*INSERT*")

🔗 References

📤 Share & Export