CVE-2025-57764

6.5 MEDIUM

📋 TL;DR

A reflected cross-site scripting (XSS) vulnerability in WeGIA web management software allows attackers to inject malicious scripts via the msg_e parameter in cargos.php. This could enable session hijacking, credential theft, or defacement of the application. All WeGIA installations prior to version 3.4.7 are affected.

💻 Affected Systems

Products:
  • WeGIA Web Manager for Charitable Institutions
Versions: All versions prior to 3.4.7
Operating Systems: Any OS running WeGIA
Default Config Vulnerable: ⚠️ Yes
Notes: The vulnerability exists in the default installation and requires no special configuration to be exploitable.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers could steal administrator credentials, hijack user sessions, redirect users to malicious sites, or deface the application interface.

🟠

Likely Case

Attackers could steal session cookies or perform actions on behalf of authenticated users, potentially compromising sensitive charitable institution data.

🟢

If Mitigated

With proper input validation and output encoding, malicious scripts would be neutralized before execution.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires tricking users into clicking malicious links containing the XSS payload in the msg_e parameter.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 3.4.7

Vendor Advisory: https://github.com/LabRedesCefetRJ/WeGIA/security/advisories/GHSA-qx7f-q867-cgx2

Restart Required: No

Instructions:

1. Backup your current WeGIA installation and database. 2. Download WeGIA version 3.4.7 or later from the official repository. 3. Replace the vulnerable cargos.php file with the patched version. 4. Verify the fix by testing the msg_e parameter with XSS payloads.

🔧 Temporary Workarounds

Input Validation Filter

all

Implement server-side input validation to sanitize the msg_e parameter before processing.

Add input sanitization in cargos.php: $msg_e = htmlspecialchars($_GET['msg_e'], ENT_QUOTES, 'UTF-8');

Web Application Firewall (WAF)

all

Deploy a WAF with XSS protection rules to block malicious payloads in the msg_e parameter.

🧯 If You Can't Patch

  • Implement Content Security Policy (CSP) headers to restrict script execution sources
  • Disable or restrict access to the cargos.php endpoint if not essential

🔍 How to Verify

Check if Vulnerable:

Test the cargos.php endpoint with a harmless XSS payload like: cargos.php?msg_e=<script>alert('test')</script> and check if script executes.

Check Version:

Check the WeGIA version in the application interface or review the source code for version markers.

Verify Fix Applied:

After patching, test with the same XSS payload and verify the script does not execute and the input is properly encoded.

📡 Detection & Monitoring

Log Indicators:

  • HTTP requests to cargos.php containing script tags or JavaScript in msg_e parameter
  • Unusual length or character patterns in msg_e parameter values

Network Indicators:

  • HTTP GET requests with suspicious parameters containing JavaScript code or encoded payloads

SIEM Query:

source="web_logs" AND uri="*cargos.php*" AND (msg_e="*<script>*" OR msg_e="*javascript:*" OR msg_e="*onerror=*" OR msg_e="*onload=*")

🔗 References

📤 Share & Export