WeGIA
CVE-2025-67501
CRITICAL
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate with matPat edit permission
-
DeliveryRequest editar_categoria.php with id_categoria
-
ExploitInject SQL payload into parameter
-
ExecutionDatabase executes attacker-controlled query
-
ImpactExfiltrate or tamper institutional data
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 endpoint checks isset($_SESSION['usuario'])) AND the account must hold permission on resource id 22 (the matPat/materials-patrimony module) at an edit-level action, per the permission check in the pre-patch code. Once those hold, the id_categoria value supplied via $_REQUEST (populated through extract($_REQUEST)) is concatenated unsanitized into 'SELECT * FROM categoria_produto WHERE id_categoria_produto = $id_categoria', permitting arbitrary SQL. Limiting factors: affected only in WeGIA versions 3.5.4 and below (fixed in 3.5.5); no user interaction needed beyond the attacker's own authenticated request; the valid privileged account requirement is the primary barrier, so insider or compromised-credential threat models are most realistic. |
| Impact | This is a genuine but access-gated vulnerability. The signals partly conflict and should be reconciled rather than taken at face value. The vendor's CVSS 4.0 vector scores 9.4 (Critical) largely because it sets subsequent-system impact to High (SC:H/SI:H/SA:H) and privileges to High (PR:H); however, the committed source evidence shows the endpoint is reached only after an authenticated session check (isset($_SESSION['usuario'])) and a permission check on resource 22 at edit level, so exploitation requires a valid, privileged application account - this is NOT remote-unauthenticated despite AV:N. I assess the real-world severity closer to CVSS 3.1 8.8 (High) because the SQL injection compromises the application's own database (full confidentiality/integrity/availability of institutional data) but does not inherently pivot to other systems, making the vendor's subsequent-system H ratings look inflated. The EPSS score is low (0.51%, 42nd percentile), consistent with a niche product and an authentication prerequisite that limits mass automated exploitation. Public exploit code exists (GitHub Security Advisory GHSA-hj2x-qfm3-2869), but there is no CISA KEV listing and no evidence of active exploitation. Net: a real, patch-now issue for anyone running WeGIA, but not an internet-wide emergency - prioritization should weight the authenticated prerequisite and the product's small footprint against the high technical impact. |
| Exploit ScenarioDerived | An authenticated WeGIA user who holds edit permission on the materials/patrimony (matPat) module sends a crafted request to /html/matPat/editar_categoria.php with a malicious id_categoria value; because the parameter is pulled via extract($_REQUEST) and concatenated directly into a SELECT against categoria_produto, the payload executes against the database. Public exploit code is available via the GitHub Security Advisory, lowering the skill needed to reproduce it, allowing the attacker to read, alter, or destroy institutional records in the application database. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 14, 2026
SQL injection in WeGIA 3.5.4 and earlier allows an authenticated user who holds edit-level permission on the matPat (materials/patrimony) module to execute arbitrary SQL against the backend database via the id_categoria parameter of /html/matPat/editar_categoria.php. Because the endpoint enforces an active session and a resource-22 permission check, exploitation realistically requires a legitimate privileged account or stolen credentials rather than an anonymous remote attacker, although publicly available exploit code exists and the CVSS 4.0 base score of 9.4 reflects full confidentiality, integrity and availability impact on both the vulnerable system and downstream components. The vendor addressed the flaw in WeGIA 3.5.5; EPSS is low at 0.51% (42nd percentile) and there is no indication of confirmed active exploitation in CISA KEV.
RemediationAI
Upgrade to WeGIA 3.5.5 or later, which is the vendor-released patch for this issue; the release is published at https://github.com/LabRedesCefetRJ/WeGIA/releases/tag/3.5.5 and the corresponding code change is commit f04b91f584a38c2061a071b26219dba3f25819e6, which replaces the concatenated query with a PDO prepared statement and adds integer sanitisation on id_categoria. The GitHub security advisory at https://github.com/LabRedesCefetRJ/WeGIA/security/advisories/GHSA-hj2x-qfm3-2869 provides the vendor's own guidance and should be reviewed before patching. If immediate upgrade is not possible, the highest-value compensating control is to audit and temporarily revoke edit-level permissions on resource id 22 (the matPat category management module) from all non-essential accounts, since the flaw is unreachable without that authorization - the trade-off is that legitimate staff lose the ability to edit product categories until they are re-granted. Organisations can also restrict network access to /html/matPat/editar_categoria.php at the reverse proxy so that only trusted administrative subnets reach it, or block requests whose id_categoria parameter contains non-numeric characters, accepting that such WAF-style filtering is bypassable and may break legitimate requests that pass unexpected input formats. Finally, review database and web server logs for anomalous SELECT statements or error output originating from editar_categoria.php, and rotate credentials for any account with matPat edit rights that may have been compromised, given that stolen or insider credentials are the most realistic exploitation path.
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
The affected code is a PHP endpoint in WeGIA, an open-source web manager aimed at Portuguese-language institutions, running on top of a MySQL/MariaDB backend accessed through both mysqli and a PDO Conexao wrapper. The root cause is CWE-89 (Improper Neutralization of Special Elements used in an SQL Command): the legacy script called extract($_REQUEST) and then interpolated the resulting $id_categoria value directly into the query "SELECT * FROM categoria_produto WHERE id_categoria_produto = $id_categoria", with no type casting, quoting or parameter binding, so any attacker-controlled string in that parameter is parsed as SQL syntax. The pre-patch flow also loaded config.php, checked isset($_SESSION['usuario']), looked up the session's id_pessoa in the funcionario table and queried the permissao table for id_recurso=22, requiring an id_acao below 3 - meaning the caller must be both authenticated and authorized to edit patrimony categories. The upstream fix (commit f04b91f584a38c2061a071b26219dba3f25819e6) restructures the file to use session_regenerate_id(), filter_var(..., FILTER_SANITIZE_NUMBER_INT) validation on both id_pessoa and id_categoria, a dedicated permissao() helper, and a PDO prepared statement with bindValue(':idCategoria', ...), which removes the injection primitive entirely. Note that the vendor-supplied CVSS 4.0 vector scores the privilege requirement as PR:H, while the independent review assessed CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H (PR:L); both agree the vector is network-reachable, low complexity and requires authenticated access.
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
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
Network-reachable PHP endpoint (AV:N/AC:L) but requires an authenticated account with matPat edit permission (PR:L); SQLi yields full DB read/write/destroy (C/I/A:H) within one authority (S:U).
Primary rating from Vendor (github).
CVSS VectorVendor: github
DescriptionCVE.org
WeGIA is an open source Web Manager for Institutions with a focus on Portuguese language users. Versions 3.5.4 and below contain an SQL Injection vulnerability in the /html/matPat/editar_categoria.php endpoint. The application fails to properly validate and sanitize user inputs in the id_categoria parameter, which allows attackers to inject malicious SQL payloads for direct execution. This issue is fixed in version 3.5.5.
Executive ViewAI
WeGIA, a web-based materials management platform, is affected by a critical SQL injection vulnerability (CVE-2025-67501) that can be exploited by a user with edit-level permissions to execute arbitrary SQL against the backend database, resulting in full compromise of data confidentiality, integrity, and availability. While exploitation requires a valid privileged account, publicly available exploit code exists, and the lack of active exploitation in CISA KEV does not eliminate the risk of insider threats or credential theft. Leadership should prioritize patching to version 3.5.5 and review access controls for the matPat module.
Apply vendor patch.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.
Affected Products (CPE)CVE.org
Critical OS Command Injection vulnerability in WeGIA (a web management system for charitable institutions) versions prio
WeGIA is a Web manager for charitable institutions. Rated critical severity (CVSS 10.0), this vulnerability is remotely
WeGIA is an open source Web Manager for Institutions with a focus on Portuguese language users. Rated critical severity
WeGIA is an open source web manager with a focus on the Portuguese language and charitable institutions. Rated critical
WeGIA is a Web manager for charitable institutions. Rated critical severity (CVSS 10.0), this vulnerability is remotely
WeGIA is a web manager for charitable institutions. Rated critical severity (CVSS 10.0), this vulnerability is remotely
WeGIA is an open source Web Manager for Institutions with a focus on Portuguese language users. Rated critical severity
WeGIA is an open source Web Manager for Institutions with a focus on Portuguese language users. Rated critical severity
WeGIA is an open source Web Manager for Institutions with a focus on Portuguese language users. Rated critical severity
WeGIA is an open source Web Manager for Institutions with a focus on Portuguese language users. Rated critical severity
WeGIA is an open source Web Manager for Institutions with a focus on Portuguese language users. Rated critical severity
WeGIA is an open source Web Manager for Institutions with a focus on Portuguese language users. Rated critical severity
NVD
CVE.org
EPSS
GitHub
Exploit-DB