Skip to main content

WeGIA CVE-2025-62360

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

Attack ChainAIDerived

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

  1. Access
    Authenticate to WeGIA instance
  2. Exploit
    POST crafted id_dependente parameter
  3. Execution
    Trigger unsanitized SQL injection
  4. Impact
    Exfiltrate or tamper with database 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 session to WeGIA: the endpoint /html/funcionario/dependente_documento.php checks $_SESSION['usuario'] and includes permissao.php before processing, so an attacker needs valid credentials or a hijacked session (consistent with CVSS PR:H/PR:L, not PR:N). Given that gate, no further special configuration is needed - any WeGIA deployment prior to 3.5.1 is affected in its default state, and the attacker simply sends a POST request with a malicious id_dependente value. The main limiting factors are the authentication requirement and the product's very small deployment base; there is no user-interaction requirement (UI:N) and attack complexity is low (AC:L).

Impact

This is a genuine high-severity SQL injection (CWE-89) with strong source-code confirmation: the patch diff shows the id_dependente value was taken directly from $_POST and interpolated into the query string, and the fix replaces it with filter_input() plus a bound PDO prepared statement - so the flaw is real and unambiguous. However, the signals point to a serious-but-not-emergency priority rather than a mass-exploitation event. The provided CVSS 4.0 vector (9.4) uses PR:H and marks subsequent-system impact (SC/SI/SA:H) as High, but the patched code only gates the endpoint behind a logged-in session ($_SESSION['usuario']) and a permissao.php check - that implies an authenticated low-privilege user, not a high-privilege operator, and there is no evidence of a scope change affecting a separate system, so the vendor vector likely overstates both PR and subsequent impact. Publicly available exploit code exists (Exploit-DB 52483) which raises practical risk, but the CVE is NOT in CISA KEV and EPSS is only 0.89% (58th percentile), indicating no observed widespread exploitation. Net: confirmed, easily exploitable post-authentication database compromise, but constrained by the authentication requirement and the niche footprint of the product, so this is a prompt-patch item rather than a drop-everything emergency.

Exploit ScenarioDerived

An authenticated WeGIA user (or an attacker who has obtained any valid session) submits a crafted id_dependente value in a POST request to /html/funcionario/dependente_documento.php, injecting arbitrary SQL that the application concatenates directly into its query. Public exploit code is available (Exploit-DB 52483), making reliable extraction, modification, or destruction of database contents straightforward. Because CVSS is AV:N/AC:L, this requires only network access and a single well-formed request with no special timing or race conditions.

Act Now Prioritize within 24-48h. Why: CRITICAL severity + public POC available.
Patch available 0.9% 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 prior to 3.5.1 allows an authenticated remote attacker to execute arbitrary SQL statements through the id_dependente POST parameter of the /html/funcionario/dependente_documento.php endpoint, fully compromising the confidentiality, integrity, and availability of the underlying database. The endpoint enforces an authenticated session ($_SESSION['usuario'] plus permissao.php), so valid credentials or a hijacked session are required, but no user interaction or special configuration is needed and the attack complexity is low. Publicly available exploit code exists, including an Exploit-DB entry and GitHub security advisories, and EPSS estimates roughly a 0.9% probability of exploitation in the near term (58th percentile); the vulnerability is fixed in WeGIA 3.5.1.

RemediationAI

Vendor-released patch: upgrade WeGIA to 3.5.1, which replaces the concatenated query in /html/funcionario/dependente_documento.php with filter_input() integer validation and a bound PDO prepared statement (fix commit https://github.com/LabRedesCefetRJ/WeGIA/commit/7abbffd3915a64b97dde01954222fc0fbd804f70); see advisories https://github.com/LabRedesCefetRJ/WeGIA/security/advisories/GHSA-m4j6-q5m4-x24g and https://github.com/LabRedesCefetRJ/WeGIA/security/advisories/GHSA-mwvv-q9gh-gwxm. If immediate upgrade is not possible, apply compensating controls with their trade-offs in mind: restrict network access to the /html/funcionario/ directory (ideally to trusted administrative hosts) so the endpoint cannot be reached by lower-privileged or external users, accepting that this may break legitimate remote staff workflows; enforce the permissao.php role checks strictly and audit who currently holds dependente/document permissions, revoking unnecessary accounts, since the flaw still requires an authenticated session; deploy a WAF rule blocking non-integer or SQL-metacharacter content in POST parameter id_dependente on that path, understanding that WAF coverage is a partial and bypassable mitigation; and because exploitation yields full database read/write, review web and MySQL logs for anomalous POSTs to dependente_documento.php and rotate database credentials and any user passwords that may have been exposed. There is no evidence of active exploitation in CISA KEV at time of analysis, but publicly available exploit code exists, so treat exposure reduction and patching as time-sensitive.

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 a PHP web application (Web Manager for Institutions) aimed at Portuguese-speaking users, and CVE-2025-62360 is a classic CWE-89 SQL injection rooted in unsafe string interpolation. In versions before 3.5.1, html/funcionario/dependente_documento.php read the raw $_POST['id_dependente'] value and concatenated it directly into the query "SELECT doc.nome_docdependente AS descricao, ddoc.data, ddoc.id_doc FROM funcionario_dependentes_docs ddoc LEFT JOIN funcionario_docdependentes doc ON doc.id_docdependentes = ddoc.id_docdependentes WHERE ddoc.id_dependente=$id_dependente;", which was then passed to $pdo->query(). Because the value was never bound as a parameter or type-checked, an attacker could break out of the intended integer comparison and inject arbitrary SQL against the PDO/MySQL back end, with results returned to the attacker as JSON via json_encode(). The upstream fix (commit 7abbffd3915a64b97dde01954222fc0fbd804f70) replaces the concatenation with filter_input(INPUT_POST, 'id_dependente', FILTER_SANITIZE_NUMBER_INT) validation plus a PDO prepared statement using bindParam(':idDependente', ...), and also adds session status checks, session_regenerate_id(), and exception handling through Util::tratarException(); the CWE-89 diagnosis is therefore confirmed directly by the patch diff. The affected CPE is cpe:2.3:a:wegia:wegia:*:*:*:*:*:*:*:* (all releases prior to 3.5.1).

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 9.4 CRITICAL
CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H
vuln.today AI 8.8 HIGH

Network-reachable endpoint with a single crafted request (AV:N/AC:L), but the code requires an authenticated session so PR:L not PR:N; full DB confidentiality, integrity and availability impact with no scope change (S:N).

3.1 AV:N/AC:L/PR:L/UI:N/S:N/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:L/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
High
Subsequent system: Integrity
High
Subsequent system: Availability
High

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_documento.php endpoint, specifically in the id_dependente 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 critical SQL injection flaw in WeGIA, the platform used to manage municipal records, exposes the underlying database to full compromise of confidentiality, integrity, and availability; publicly available exploit code exists, raising the likelihood that the technique will be reused against unpatched deployments. Because WeGIA typically stores citizen, employee, and dependent records, a successful attack could result in mass data exposure, unauthorized record alteration or deletion, and regulatory notification obligations for the affected municipality. Leadership should treat remediation as urgent for any instance still running a version earlier than 3.5.1.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.9%
Top 42% exploitable
Prevalence
Rare
obscure academic open-source manager for Portuguese-language institutions, tiny footprint
Exploit
POC
Public exploit code exists
Data Quality
5 sources
Confidence: Medium
NVD CVE.org EPSS Exploit-DB GitHub

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 CRITICAL
CISA KEV No
Public POC Yes
EPSS 0.9%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity + public POC available
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

68
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +47
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