Skip to main content

WeGIA CVE-2025-62177

HIGH
SQL Injection (CWE-89)
2025-10-13 security-advisories@github.com
8.6
CVSS 4.0 · Vendor: github
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain authenticated WeGIA session
  2. Delivery
    Send crafted POST to dependente_listar.php
  3. Exploit
    Inject SQL via id_funcionario parameter
  4. Execution
    Execute arbitrary database queries
  5. Impact
    Exfiltrate or alter employee/dependent records

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Parameterized queries, prepared statements
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Persistence

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires an authenticated WeGIA session: the vulnerable endpoint /html/funcionario/dependente_listar.php first checks for a valid $_SESSION["usuario"] and enforces a permission check via permissao.php (confirmed in the patch diff), so the attacker must hold a logged-in account with access to the employee-dependents feature. Given that gate, an authorized or account-compromised user can inject arbitrary SQL through the id_funcionario POST parameter against any WeGIA instance prior to 3.5.1 in its default configuration (no special non-default setting is needed beyond having the feature/account). The primary limiting factor is the required privilege level (PR:H) and valid authentication; there is no user-interaction requirement and no platform-specific constraint beyond running a PHP/WeGIA deployment older than 3.5.1.

Impact

This is a genuine but conditionally-gated vulnerability rather than a top-tier emergency. The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:H/UI:N, VC/VI/VA:H, score 8.6) indicates a network-reachable, low-complexity SQL injection with full confidentiality, integrity, and availability impact on the database, but critically it requires high privileges (PR:H) - the endpoint checks for an authenticated session ($_SESSION["usuario"]) and a permission gate (permissao.php), confirmed by the patch diff. This means it is NOT a remote-unauthenticated flaw; an attacker must already hold a valid, permissioned account. Exploitation signals are mixed: publicly available exploit code exists (GHSA-4wrg-g9cj-hjcx), which raises practical risk, but EPSS is low at 0.53% (43rd percentile) and the CVE is NOT in CISA KEV, so there is no evidence of active in-the-wild exploitation. The low EPSS is consistent with the authentication requirement and the product's niche footprint, suggesting the real-world threat is limited to insider/compromised-account scenarios rather than mass opportunistic attacks. Priority is moderate: patch promptly for any WeGIA deployment, but the PR:H gate materially reduces exposure compared to a raw 8.6 score read in isolation.

Exploit ScenarioDerived

An attacker who already holds an authenticated WeGIA account with employee-view permissions sends a crafted POST request to /html/funcionario/dependente_listar.php with a malicious id_funcionario value, injecting SQL into the unparameterized query. Because public exploit code exists in the GitHub security advisory, a low-skill authenticated or account-compromised attacker can dump or tamper with the entire database (person records, CPFs, employee data). The network attack vector and low complexity make the request trivial to deliver once a session is obtained.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.5% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 08, 2026

SQL injection in WeGIA's employee-dependents endpoint (/html/funcionario/dependente_listar.php) lets a logged-in user with access to that feature execute arbitrary SQL against the backend database, compromising the confidentiality, integrity, and availability of stored data. The flaw affects every WeGIA release prior to 3.5.1 and is triggered through the id_funcionario POST parameter; because the endpoint enforces a valid $_SESSION["usuario"] and a permissao.php check, the attack is authenticated (PR:H) rather than unauthenticated. Publicly available exploit code exists and the vendor has shipped a fix in 3.5.1, but EPSS is low (0.53%, 43rd percentile) and there is no confirmed active exploitation (no CISA KEV listing).

RemediationAI

Vendor-released patch: upgrade WeGIA to 3.5.1, which replaces the string-interpolated query with a parameterized PDO prepared statement and validates id_funcionario as an integer (commit 017fdd71380ab898570752aebc3fe1ef318a5d0d; see also the advisory at https://github.com/LabRedesCefetRJ/WeGIA/security/advisories/GHSA-4wrg-g9cj-hjcx). If an immediate upgrade is not possible, deploy a compensating control that removes or blocks the request path to /html/funcionario/dependente_listar.php (for example via a web-server rewrite rule or WAF rule rejecting POSTs to that script) - the trade-off is that the employee-dependents listing feature becomes unavailable to legitimate staff. Additionally, audit and minimize the accounts granted the dependents permission, since the flaw is only reachable by an authenticated user holding that privilege, and rotate credentials for any account suspected of compromise. Review database logs for anomalous SQL submitted to that endpoint as a detection measure, recognizing that a WAF rule based on payload signatures can be bypassed by encoding tricks and should not be treated as a substitute for the 3.5.1 patch.

Affects your stack

Find out whether the stacks and servers you run are on an affected version.

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

WeGIA is an open-source PHP web application ("Web Manager for Institutions") built around a MySQL-style backend accessed through PDO. The vulnerable code in html/funcionario/dependente_listar.php took the raw POST value $_POST["id_funcionario"] and substituted it directly into a SQL string executed with $pdo->query(), so a crafted value was parsed as SQL rather than as data - the classic CWE-89 SQL injection root cause. The endpoint builds a multi-table SELECT over funcionario_dependentes, funcionario, pessoa, and funcionario_dependente_parentesco to list an employee's dependents, which is why injected payloads can pivot across those tables and beyond. The upstream commit 017fdd71380ab898570752aebc3fe1ef318a5d0d fixes it by replacing the dynamic query with a PDO prepared statement (WHERE fdep.id_funcionario = :idFuncionario), binding the value, and validating it with filter_input(INPUT_POST, 'id_funcionario', FILTER_SANITIZE_NUMBER_INT); the same patch also tightens session handling (session_status/session_regenerate_id) and converts fatal errors into handled exceptions. The CPE cpe:2.3:a:wegia:wegia:*:*:*:*:*:*:*:* confirms that all prior WeGIA versions are in scope until the 3.5.1 release line.

Know when Wegia gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (github) PRIMARY 8.6 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
vuln.today AI 7.2 HIGH

Network-reachable endpoint (AV:N) with a trivial injection (AC:L), but the session and permission checks in the code force PR:H; full database CIA impact gives C:H/I:H/A:H.

3.1 AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (github).

CVSS VectorVendor: github

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
High
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

WeGIA is an open source Web Manager for Institutions with a focus on Portuguese language users. Prior to 3.5.1, a SQL Injection vulnerability was identified in the /html/funcionario/dependente_listar.php endpoint, specifically in the id_funcionario parameter. This vulnerability allows attackers to execute arbitrary SQL commands, compromising the confidentiality, integrity, and availability of the database. This vulnerability is fixed in 3.5.1.

Executive ViewAI

Why It Matters

A high-severity SQL injection in WeGIA’s employee-dependents module affects all releases before 3.5.1 and can let an authenticated user with access to that feature read or modify sensitive data stored in the backend database. Because the affected records include employee and dependent information, leadership should prioritize patching to prevent potential privacy, compliance, and data-integrity consequences, even though no active exploitation is confirmed.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.5%
Top 57% exploitable
Prevalence
Low
niche open-source manager for Portuguese-language institutions, no broad footprint
Exploit
POC
Public exploit code exists
Data Quality
4 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 0.5%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
Poc
System Exposure· derived
Open
Automatable· derived
No
Human Impact
High

Priority Score

64
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +43
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.

Affected Products (CPE)CVE.org

cpe:2.3:a:wegia:wegia:*:*:*:*:*:*:*:*

More in Wegia

View all
CVE-2025-50201 CRITICAL POC
9.8 Jun 19

Critical OS Command Injection vulnerability in WeGIA (a web management system for charitable institutions) versions prio

CVE-2025-27140 CRITICAL POC
10.0 Feb 24

WeGIA is a Web manager for charitable institutions. Rated critical severity (CVSS 10.0), this vulnerability is remotely

CVE-2025-26613 CRITICAL POC
10.0 Feb 18

WeGIA is an open source Web Manager for Institutions with a focus on Portuguese language users. Rated critical severity

CVE-2025-55169 CRITICAL POC
10.0 Aug 12

WeGIA is an open source web manager with a focus on the Portuguese language and charitable institutions. Rated critical

CVE-2025-30364 CRITICAL POC
10.0 Mar 27

WeGIA is a Web manager for charitable institutions. Rated critical severity (CVSS 10.0), this vulnerability is remotely

CVE-2025-46828 CRITICAL POC
10.0 May 07

WeGIA is a web manager for charitable institutions. Rated critical severity (CVSS 10.0), this vulnerability is remotely

CVE-2025-26612 CRITICAL POC
10.0 Feb 18

WeGIA is an open source Web Manager for Institutions with a focus on Portuguese language users. Rated critical severity

CVE-2025-26617 CRITICAL POC
10.0 Feb 18

WeGIA is an open source Web Manager for Institutions with a focus on Portuguese language users. Rated critical severity

CVE-2025-26611 CRITICAL POC
10.0 Feb 18

WeGIA is an open source Web Manager for Institutions with a focus on Portuguese language users. Rated critical severity

CVE-2025-26609 CRITICAL POC
10.0 Feb 18

WeGIA is an open source Web Manager for Institutions with a focus on Portuguese language users. Rated critical severity

CVE-2025-26608 CRITICAL POC
10.0 Feb 18

WeGIA is an open source Web Manager for Institutions with a focus on Portuguese language users. Rated critical severity

CVE-2025-26607 CRITICAL POC
10.0 Feb 18

WeGIA is an open source Web Manager for Institutions with a focus on Portuguese language users. Rated critical severity

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy