Skip to main content

WeGIA CVE-2025-67501

CRITICAL
SQL Injection (CWE-89)
2025-12-10 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 with matPat edit permission
  2. Delivery
    Request editar_categoria.php with id_categoria
  3. Exploit
    Inject SQL payload into parameter
  4. Execution
    Database executes attacker-controlled query
  5. Impact
    Exfiltrate 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.

Act Now Prioritize within 24-48h. Why: CRITICAL severity + public POC available.
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 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

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 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).

3.1 AV:N/AC:L/PR:L/UI:N/S:U/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. 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

Why It Matters

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.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.5%
Top 58% exploitable
Prevalence
Rare
obscure Brazilian academic open-source institutional manager, tiny deployment 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 CRITICAL
CISA KEV No
Public POC Yes
EPSS 0.5%
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