Raw vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HSummary
CVE-2026-40285 is a high-severity SQL Injection (CWE-89) vulnerability. Its CVSS base score is 8.8 (High).
Operationally, exploitation aligns with the MITRE ATT&CK technique Exploit Public-Facing Application (T1190); ranked at the 18th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog.
The strongest mitigations our analysis identified map to IA-2 (Identification and Authentication (Organizational Users)) and SA-11 (Developer Testing and Evaluation) — see the control section below for these in your framework.
Deeper analysis AI-assisted summary
Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.
CVE-2026-40285 is a SQL injection vulnerability in WeGIA, a web-based management system for charitable institutions, affecting versions prior to 3.6.10. The flaw exists in the dao/memorando/UsuarioDAO.php component, where the cpf_usuario POST parameter overwrites the session-stored user identity via extract($_REQUEST) in the DespachoControle::verificarDespacho() function. This attacker-controlled value is then directly interpolated into a raw SQL query, enabling unauthorized database access under a falsified identity.
The vulnerability can be exploited by any low-privileged authenticated user (PR:L) over the network (AV:N) with low attack complexity (AC:L) and no user interaction (UI:N), resulting in a CVSS v3.1 base score of 8.8 (C:H/I:H/A:H). Attackers can impersonate arbitrary users to query the database, potentially extracting sensitive data, modifying records, or disrupting services. It is associated with CWE-89 (SQL Injection), CWE-302 (Authentication Bypass by Assumed-Immutable Data), and CWE-473 (PHP External Variable Modification).
The GitHub Security Advisory GHSA-666r-v2m7-xgp9, published on 2026-04-17, documents the issue and confirms that upgrading to WeGIA version 3.6.10 addresses the vulnerability by fixing the insecure parameter handling and SQL interpolation.
OWASP Top 10 for Web (2025)
EU & UK References
- 🇪🇺 ENISA EUVD: EUVD-2026-23529
Vulnerability Data
WeGIA is a web manager for charitable institutions. Versions prior to 3.6.10 contain a SQL injection vulnerability in dao/memorando/UsuarioDAO.php. The cpf_usuario POST parameter overwrites the session-stored user identity via extract($_REQUEST) in DespachoControle::verificarDespacho(), and the attacker-controlled value is then interpolated directly…
more
into a raw SQL query, allowing any authenticated user to query the database under an arbitrary identity. Version 3.6.10 fixes the issue.
- CWE(s)
Related Threats
MITRE ATT&CK Enterprise Techniques
CVEs Like This One
Affected Assets
Mitigating Controls
Control response
—
—
—
V7.2.4V1.2.4V15.3.5V15.3.7
Mitigating Controls (NIST 800-53 r5) AI
Mandates proper unique identification and authentication of users, precluding reliance on attacker-controlled immutable assumptions.
Developer testing and evaluation can discover SQLi flaws before deployment but does not stop their introduction.
Input validation directly stops untrusted data from reaching SQL query construction without neutralization.
Requires server-side enforcement of authorizations instead of trusting client-supplied mutable data for authentication decisions.
Mandates proper identification and authentication for non-organizational users, precluding reliance on attacker-controlled immutable assumptions.
Secure engineering principles require parameterized queries and input sanitization that structurally eliminate SQLi.
Mitigating Controls (NIST CSF 2.0) AI
Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.
Secure SDLC practices include input validation and safe variable handling that prevent this exact weakness.
Strong authentication mechanisms directly avoid reliance on attacker-controlled immutable data.
Protecting and verifying identity assertions prevents tampering with data assumed immutable during auth.
Secure PHP configuration (e.g., register_globals=off) directly blocks external variable injection.
Least-privilege authorization policies reduce impact of bypassed authentication but do not address the root flaw.
Training raises developer awareness of SQLi risks and can reduce introduction likelihood (partial) but removes none of the actual coding flaw's risk by itself since technical neutralization is still required.
Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI
Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.
The same secure-coding and static-analysis activities surface missing neutralization of SQL metacharacters before the system is accepted.
Access-control policy can mandate validation of all identity data, reducing reliance on assumed-immutable fields.
Identity-management processes can require verification of mutable attributes, mitigating the root cause.
Proper management of authentication information prevents use of client-controlled tokens or cookies as sole proof of identity.
Access-rights reviews can detect and revoke rights granted via tampered immutable data.
Early warnings and shared best-practice information help organizations apply the latest remediation techniques against SQL-injection vulnerabilities.