Cyber Resilience

CVE-2026-40285

SQLi

Published
17 April 2026
Modified
20 April 2026
CVSS Score v3.1 8.8
Click a component to see what it means
Raw vectorCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS Score 0.0027 18th percentile
Risk Priority 63 floored blend · peak EPSS

Summary

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

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

T1190 Exploit Public-Facing Application Initial Access
Adversaries may attempt to exploit a weakness in an Internet-facing host or system to initially access a network.
T1134 Access Token Manipulation Stealth
Adversaries may modify access tokens to operate under a different user or system security context to perform actions and bypass access controls.
T1528 Steal Application Access Token Credential Access
Adversaries can steal application access tokens as a means of acquiring credentials to access remote systems and resources.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2023-26034Shared CWE-89
CVE-2023-46914Shared CWE-89
CVE-2023-44284Shared CWE-89
CVE-2023-48722Shared CWE-89
CVE-2024-4071Shared CWE-89
CVE-2023-49085Shared CWE-89
CVE-2024-25314Shared CWE-89
CVE-2024-0528Shared CWE-89
CVE-2024-8167Shared CWE-89
CVE-2023-7142Shared CWE-89

Affected Assets

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)

Detect
Catch it (NIST detect / respond)

Harden
Shrink the surface (DISA STIG)

Validate
Prove the fix (OWASP ASVS)
  • V7.2.4
  • V1.2.4
  • V15.3.5
  • V15.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.

PR.PS-06 full match
prevents

Secure SDLC practices include input validation and safe variable handling that prevent this exact weakness.

PR.AA-03 mostly match
prevents

Strong authentication mechanisms directly avoid reliance on attacker-controlled immutable data.

PR.AA-04 mostly match
prevents

Protecting and verifying identity assertions prevents tampering with data assumed immutable during auth.

PR.PS-01 mostly match
prevents

Secure PHP configuration (e.g., register_globals=off) directly blocks external variable injection.

PR.AA-05 partial match
prevents

Least-privilege authorization policies reduce impact of bypassed authentication but do not address the root flaw.

PR.AT-02 partial match
prevents

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.

finds

The same secure-coding and static-analysis activities surface missing neutralization of SQL metacharacters before the system is accepted.

degrades

Access-control policy can mandate validation of all identity data, reducing reliance on assumed-immutable fields.

degrades

Identity-management processes can require verification of mutable attributes, mitigating the root cause.

degrades

Proper management of authentication information prevents use of client-controlled tokens or cookies as sole proof of identity.

mitigates

Access-rights reviews can detect and revoke rights granted via tampered immutable data.

prevents

Early warnings and shared best-practice information help organizations apply the latest remediation techniques against SQL-injection vulnerabilities.

References