CVE-2025-22597

8.3 HIGH

📋 TL;DR

A stored XSS vulnerability in WeGIA's CobrancaController.php endpoint allows attackers to inject malicious scripts via the local_recepcao parameter. These scripts execute automatically when users access affected pages, potentially compromising user sessions and data. All WeGIA instances below version 3.2.8 are affected.

💻 Affected Systems

Products:
  • WeGIA
Versions: All versions before 3.2.8
Operating Systems: Any OS running WeGIA
Default Config Vulnerable: ⚠️ Yes
Notes: The vulnerability exists in the default installation; no special configuration is required for exploitation.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers steal administrator credentials, hijack user sessions, deface the application, or deploy malware to visitors' browsers, leading to complete system compromise and data theft.

🟠

Likely Case

Attackers steal session cookies to impersonate users, redirect users to malicious sites, or perform actions on behalf of authenticated users.

🟢

If Mitigated

With proper input validation and output encoding, malicious scripts are neutralized before execution, preventing exploitation.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation requires access to the vulnerable endpoint; authentication status is unspecified in the advisory.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 3.2.8

Vendor Advisory: https://github.com/LabRedesCefetRJ/WeGIA/security/advisories/GHSA-mgj3-g922-2r9v

Restart Required: No

Instructions:

1. Backup your WeGIA installation and database. 2. Download WeGIA version 3.2.8 from the official repository. 3. Replace the existing files with the patched version. 4. Verify the update by checking the version in the application interface.

🔧 Temporary Workarounds

Input Validation and Sanitization

all

Implement server-side validation to reject or sanitize malicious input in the local_recepcao parameter.

Content Security Policy (CSP)

all

Deploy a strict CSP header to mitigate XSS impact by restricting script execution sources.

🧯 If You Can't Patch

  • Implement a Web Application Firewall (WAF) with XSS protection rules to block malicious payloads.
  • Disable or restrict access to the CobrancaController.php endpoint if not required for operations.

🔍 How to Verify

Check if Vulnerable:

Review the WeGIA version in the application's admin panel or check the source code for the vulnerable parameter in CobrancaController.php.

Check Version:

Check the WeGIA admin interface or inspect the application's configuration files for version information.

Verify Fix Applied:

After patching, test the local_recepcao parameter with a benign payload (e.g., <script>alert('test')</script>) to ensure it is sanitized or rejected.

📡 Detection & Monitoring

Log Indicators:

  • Unusual POST requests to CobrancaController.php with script tags or JavaScript in parameters
  • Multiple failed login attempts following script injection

Network Indicators:

  • Unexpected outbound connections from the WeGIA server to external domains
  • Traffic patterns indicating data exfiltration

SIEM Query:

source="wegia_logs" AND (url="*CobrancaController.php*" AND (param="*<script>*" OR param="*javascript:*"))

🔗 References

📤 Share & Export