CVE-2025-53930

5.4 MEDIUM

📋 TL;DR

A stored cross-site scripting (XSS) vulnerability in WeGIA's adicionar_especie.php endpoint allows attackers to inject malicious scripts via the 'especie' parameter. These scripts are stored on the server and automatically execute when users access affected pages, potentially compromising user sessions and data. Organizations using WeGIA versions before 3.4.5 are affected.

💻 Affected Systems

Products:
  • WeGIA
Versions: All versions prior to 3.4.5
Operating Systems: Any OS running WeGIA
Default Config Vulnerable: ⚠️ Yes
Notes: Affects the adicionar_especie.php endpoint specifically; requires attacker access to this functionality.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers could steal administrator credentials, hijack user sessions, deface websites, or redirect users to malicious sites, potentially leading to complete system compromise.

🟠

Likely Case

Session hijacking, credential theft, and unauthorized actions performed on behalf of authenticated users.

🟢

If Mitigated

Limited impact with proper input validation and output encoding, though stored XSS remains a persistent threat.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation requires access to the vulnerable endpoint; typical XSS payloads can be used.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 3.4.5

Vendor Advisory: https://github.com/LabRedesCefetRJ/WeGIA/security/advisories/GHSA-cxx4-6x69-vg4x

Restart Required: Yes

Instructions:

1. Backup current installation. 2. Download WeGIA version 3.4.5 from official repository. 3. Replace existing files with patched version. 4. Restart web server. 5. Verify functionality.

🔧 Temporary Workarounds

Input Validation Filter

all

Implement server-side input validation to sanitize the 'especie' parameter

Modify adicionar_especie.php to include: $especie = htmlspecialchars($_POST['especie'], ENT_QUOTES, 'UTF-8');

WAF Rule

all

Deploy web application firewall rules to block XSS payloads in POST requests

Add WAF rule: Detect and block patterns like <script>, javascript:, onerror= in especie parameter

🧯 If You Can't Patch

  • Implement strict Content Security Policy (CSP) headers to restrict script execution
  • Disable or restrict access to the adicionar_especie.php endpoint using web server configuration

🔍 How to Verify

Check if Vulnerable:

Test by submitting a payload like <script>alert('XSS')</script> to the especie parameter in adicionar_especie.php and checking if it executes when page loads

Check Version:

Check WeGIA version in admin panel or review application files for version indicators

Verify Fix Applied:

Attempt the same XSS payload; it should be properly encoded and not execute

📡 Detection & Monitoring

Log Indicators:

  • Unusual POST requests to adicionar_especie.php with script tags or JavaScript code in parameters
  • Multiple failed XSS attempts in web server logs

Network Indicators:

  • HTTP requests containing <script> tags or JavaScript in POST body to vulnerable endpoint

SIEM Query:

source="web_server" AND uri="/adicionar_especie.php" AND (body CONTAINS "<script>" OR body CONTAINS "javascript:")

🔗 References

📤 Share & Export