WeGIA Authenticated Error-Based SQL Injection Exploitation Helper (CVE-2026-23723)
by ViniCastro2001 (original PoC reporter); helper script by Ch35h1r3c47 · 2026-07-05
- Severity
- High
- CVE
- CVE-2026-23723 / GHSA-xfmp-2hf9-gfjp
- Category
- web
- Affected product
- WeGIA (Web Gestão Integrada de Associações)
- Affected versions
- <= 3.6.1
- Disclosed
- 2026-07-05
- Patch status
- unpatched
Archive entry
intelseclab/poc-archiveMetadata
| Field | Value |
|---|---|
| Date Added | 2026-07-05 |
| Last Updated | 2026-02 |
| Author / Researcher | ViniCastro2001 (original PoC reporter); helper script by Ch35h1r3c47 |
| CVE / Advisory | CVE-2026-23723 / GHSA-xfmp-2hf9-gfjp |
| Category | web |
| Severity | High |
| CVSS Score | Not specified in source |
| Status | Weaponized |
| Tags | wegia, sql-injection, authenticated, sqlmap, php, session-hijack, database-dump, error-based |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | WeGIA (Web Gestão Integrada de Associações) |
| Versions Affected | <= 3.6.1 |
| Language / Platform | Python 3 helper script targeting a PHP/MariaDB web application |
| Authentication Required | Yes |
| Network Access Required | Yes |
Summary
WeGIA’s control.php endpoint (Atendido_ocorrenciaControle::listarTodosComAnexo) is vulnerable to authenticated error-based SQL injection through the id_memorando parameter. This helper script automates the tedious part of exploitation: it attempts login against several common WeGIA form-field naming conventions and login paths, extracts the resulting PHP session cookie, and writes a ready-to-use sqlmap request file with the injection point pre-marked. It then prints a set of copy-paste sqlmap commands for enumerating databases, opening an interactive SQL shell, and dumping tables such as funcionario. This is a convenience/automation wrapper around a manual sqlmap-driven exploitation workflow rather than a self-contained exploit.
Vulnerability Details
Root Cause
The id_memorando request parameter in control.php?nomeClasse=Atendido_ocorrenciaControle&metodo=listarTodosComAnexo is concatenated into a SQL query without parameterization, producing an error-based SQL injection reachable by any authenticated user.
Attack Vector
- Run the helper script with valid WeGIA credentials; it brute-forces common login paths/field names to authenticate.
- On successful login, the script extracts the PHP session cookie.
- It writes an sqlmap
.reqfile targeting the vulnerableid_memorandoparameter with the injection marker (id_memorando=1*). - The operator runs the printed sqlmap commands (
--sql-shell,--dbs,--dump, etc.) against the generated request file to enumerate and exfiltrate the database.
Impact
Authenticated attacker can achieve full database read access (credentials, PII, application data) via sqlmap-driven error-based injection, and potentially an interactive SQL shell.
Environment / Lab Setup
Target: WeGIA <= 3.6.1
Attacker: Python 3, requests library, sqlmap installed and in PATH
Proof of Concept
PoC Script
See
CVE-2026-23723.pyin this folder.
| |
The script logs into WeGIA, extracts the session cookie, generates an sqlmap-compatible .req file marking the id_memorando injection point, and prints ready-to-run sqlmap commands (interactive SQL shell, database/table enumeration, targeted or full dump).
Detection & Indicators of Compromise
POST /html/login.php ... cpf=... / login=... / usuario=...
GET /controle/control.php?nomeClasse=Atendido_ocorrenciaControle&metodo=listarTodosComAnexo&id_memorando=...
Signs of compromise:
- SQL error messages or unusual response timing correlated with
id_memorandoparameter variations. - Authenticated sessions issuing high-volume or sqlmap-signature requests (tamper scripts, boolean/time-based payloads) against
control.php. - Unexpected
.req-style request files or sqlmap output directories on analyst/attacker workstations.
Remediation
| Action | Detail |
|---|---|
| Primary fix | Upgrade WeGIA past the version fixed per GHSA-xfmp-2hf9-gfjp; use parameterized queries for id_memorando |
| Interim mitigation | Apply WAF rules against SQLi patterns on control.php, restrict authenticated roles that can reach listarTodosComAnexo, and enable database query logging/alerting |
References
Notes
Mirrored from https://github.com/Ch35h1r3c47/CVE-2026-23723-POC on 2026-07-05.
| |