Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2025-54062

CVE-2025-54062: Wegia SQL Injection Vulnerability

CVE-2025-54062 is a SQL injection flaw in Wegia web manager that allows attackers to execute arbitrary SQL commands and compromise database security. This article covers technical details, affected versions, and mitigation.

Published:

CVE-2025-54062 Overview

CVE-2025-54062 is a SQL Injection vulnerability in WeGIA, an open source web manager focused on Portuguese-language charitable institutions. The flaw exists in the /html/funcionario/profile_dependente.php endpoint, where the id_dependente parameter is passed unsanitized into SQL queries. Attackers with low-privileged authenticated access can inject arbitrary SQL statements through this parameter. Successful exploitation compromises database confidentiality, integrity, and availability. The vulnerability affects all WeGIA versions prior to 3.4.6 and is tracked under CWE-89. The maintainers released version 3.4.6 to address the issue.

Critical Impact

Authenticated attackers can execute arbitrary SQL commands against the WeGIA database, enabling data exfiltration, modification, and destruction.

Affected Products

  • WeGIA versions prior to 3.4.6
  • Endpoint: /html/funcionario/profile_dependente.php
  • Parameter: id_dependente

Discovery Timeline

  • 2025-07-17 - CVE-2025-54062 published to NVD
  • 2025-07-30 - Last updated in NVD database

Technical Details for CVE-2025-54062

Vulnerability Analysis

The vulnerability is a classic SQL Injection flaw in the profile_dependente.php endpoint of WeGIA. The endpoint accepts the id_dependente GET or POST parameter and incorporates its value directly into a backend SQL query. Because the application fails to sanitize, validate, or parameterize this input, attackers can append SQL syntax to the parameter value. This breaks out of the intended query context and executes attacker-controlled SQL against the underlying database. WeGIA manages sensitive records for charitable institutions, including employee dependents, financial data, and operational records. Successful exploitation grants direct access to this data store.

Root Cause

The root cause is the absence of prepared statements or input validation on the id_dependente parameter inside profile_dependente.php. PHP code paths that concatenate user input into SQL strings without parameter binding allow injected operators, UNION clauses, and stacked queries to alter query semantics. This pattern aligns with CWE-89: Improper Neutralization of Special Elements used in an SQL Command.

Attack Vector

An authenticated attacker with low privileges sends a crafted HTTP request to /html/funcionario/profile_dependente.php with malicious SQL syntax inside the id_dependente parameter. The injected payload can extract database contents via UNION SELECT, infer values through boolean-based or time-based blind techniques, or modify and delete records. The attack is network-reachable and requires no user interaction. See the GitHub Security Advisory GHSA-f53c-f6jx-cm56 for additional technical context.

Detection Methods for CVE-2025-54062

Indicators of Compromise

  • HTTP requests to /html/funcionario/profile_dependente.php containing SQL metacharacters such as ', --, UNION, SELECT, SLEEP(, or ; in the id_dependente parameter.
  • Unexpected database errors logged by PHP or the database engine referencing profile_dependente.php.
  • Anomalous outbound data transfers or large result sets returned from WeGIA database queries.

Detection Strategies

  • Inspect web server access logs for non-numeric values in the id_dependente parameter, since legitimate traffic should pass an integer identifier.
  • Deploy Web Application Firewall (WAF) rules that match common SQL Injection signatures targeting WeGIA endpoints.
  • Enable database query auditing to surface queries containing tautologies, stacked statements, or schema enumeration against tables used by WeGIA.

Monitoring Recommendations

  • Forward WeGIA application logs, web server logs, and database audit logs to a centralized analytics platform for correlation.
  • Alert on repeated 500-series HTTP responses from profile_dependente.php, which often indicate injection probing.
  • Track authenticated session activity for users issuing abnormal request volumes against /html/funcionario/ endpoints.

How to Mitigate CVE-2025-54062

Immediate Actions Required

  • Upgrade WeGIA to version 3.4.6 or later, which contains the official fix.
  • Restrict network access to the WeGIA application to trusted users and networks until patching is complete.
  • Rotate database credentials and audit recent database activity if exploitation is suspected.

Patch Information

The WeGIA maintainers fixed this vulnerability in version 3.4.6. Upgrade instructions and release notes are available through the GitHub Security Advisory GHSA-f53c-f6jx-cm56 published by LabRedesCefetRJ.

Workarounds

  • Place a Web Application Firewall in front of WeGIA and block requests where id_dependente is not a positive integer.
  • Temporarily disable or restrict access to the /html/funcionario/profile_dependente.php endpoint until the upgrade is applied.
  • Apply least-privilege database accounts so the WeGIA service user cannot perform destructive operations or read unrelated schemas.

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.