Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate with SqlView access
-
DeliveryCall sqlViews data.json endpoint
-
ExploitInject SQL via filter parameter
-
ExecutionPostgreSQL evaluates crafted expression
-
PersistRead reflected error output
-
ImpactExfiltrate arbitrary database content
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 DHIS2 account that has been granted access to at least one SqlView and can reach the |
| Impact | The provided CVSS 3.1 vector CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H (8.8, High) indicates a network-reachable, low-complexity attack requiring low privileges and no user interaction, with high confidentiality/integrity/availability impact - consistent with arbitrary SQL execution against the backing database. The PR:L is the key gating factor: exploitation requires an authenticated account that has been granted access to a SqlView, so this is a data-exfiltration/privilege-abuse risk from an insider or compromised low-privilege account rather than an unauthenticated internet-wide bug. No EPSS score, KEV entry, POC, or SSVC decision data was supplied, so exploitation probability and automatability cannot be quantified from the input, and the absence of a KEV listing means there is no confirmation of active exploitation. Overall this is a genuinely serious flaw for organizations that grant SqlView access broadly, but the real-world blast radius depends on how tightly SqlView authority is controlled - verify your instance's authority assignments rather than treating it as a purely external threat. |
| Exploit ScenarioDerived | An analyst or reporting user who has been granted SqlView access authenticates to the DHIS2 API and calls |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 21, 2026
Error-based SQL injection in the DHIS2 core SqlView API (the filter parameter of /api/sqlViews/{viewId}/data.json) lets an authenticated user who has access to a SqlView inject arbitrary SQL that PostgreSQL evaluates, with the result reflected in the application error message to exfiltrate arbitrary database content. It affects DHIS2 core across the 2.37 through 2.44 lines (2.37-2.39 reached end-of-support on 2026-06-09), and the root cause is an unquoted column name concatenated into the query, fixed in PR #24162 by wrapping it in SqlUtils.quote(). There is no public exploit identified at time of analysis and no CISA KEV listing, but the vendor-issued GHSA advisory and CVSS 8.8 mark it as a high-priority patch for any DHIS2 instance where SqlView access is broadly granted.
RemediationAI
Vendor-released patch: upgrade to 2.40.11.1 or 2.40.12, 2.41.8.2, 2.42.5.1, or 2.43.0.1 depending on your branch (2.44 development builds must include PR #24162 or later); see GHSA-pwmg-mvjw-4m23 at https://github.com/dhis2/dhis2-core/security/advisories/GHSA-pwmg-mvjw-4m23 and the fix at https://github.com/dhis2/dhis2-core/pull/24162. The 2.37, 2.38 and 2.39 branches reached end-of-support on 2026-06-09 and receive no patch, so users on those lines must migrate to a supported release. As compensating controls until patched, revoke or tightly restrict the authorities that grant SqlView access so only trusted administrators retain it, and run the DHIS2 database connection under a least-privilege PostgreSQL role that cannot read or write outside the application schema to limit injected-query impact - the trade-off is that overly restrictive DB grants can break legitimate SqlView execution and analytics. Additionally, restrict network exposure of the /api/sqlViews/ endpoints via reverse-proxy or WAF rules where feasible, accepting that this may impede legitimate API-driven reporting.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 5 packages in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
DHIS2 is an open-source health information platform (dhis2-core, Java/Spring backed by a PostgreSQL database) used for data capture, validation, analytics and visualization, most prominently across national ministry-of-health deployments. The SqlView feature lets privileged users define and run stored SQL views; the data.json endpoint accepts a filter parameter compiled into a WHERE clause. The flaw is CWE-89 (Improper Neutralization of Special Elements used in an SQL Command): per the PR #24162 diff to DefaultSqlViewService.getFilterQuery(), the columnName derived from the filter was concatenated directly into the SQL string rather than quoted, so a crafted filter can inject a PostgreSQL expression whose evaluation error surfaces data back to the caller - classic error-based extraction. The affected component is identified by CPE cpe:2.3:a:dhis2:dhis2-core:*:*:*:*:*:*:*:* and the tags PostgreSQL, SQLi, and Dhis2 Core. Note: the same PR also adds an unrelated ObjectInputFilter deserialization hardening to HibernateUserSettingStore, which is defense-in-depth and not the SQLi fix itself.
Know when PostgreSQL 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
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Network-reachable API, low complexity, no interaction, but requires an authenticated user holding SqlView access (PR:L); arbitrary SQL injection enables data read, modification and DoS, so C/I/A all High.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
DHIS2 is a flexible information system for data capture, management, validation, analytics and visualization. A SQL injection vulnerability was identified in the SqlView API endpoint of the DHIS2 application in the filter parameter used by the /api/sqlViews/{viewId}/data.json endpoint. An authenticated user with access to a SqlView can inject arbitrary SQL queries inside the filter parameter by abusing an expression executed by PostgreSQL and its output is reflected inside the application error message. This behavior enables attackers to extract arbitrary database content using error-based SQL injection.
Affected versions include: 2.37, 2.38, 2.39, 2.40.x before 2.40.11.1/2.40.12, 2.41.x before 2.41.8.2, 2.42.x before 2.42.5.1, 2.43.0 before 2.43.0.1, 2.44 development branch before PR #24162 Patched versions include: 2.37-EOS (2026-06-09), 2.38-EOS (2026-06-09), 2.39-EOS (2026-06-09), 2.40.11.1, 2.40.12, 2.41.8.2, 2.42.5.1, 2.43.0.1, 2.44 development branch after PR #24162
Executive ViewAI
DHIS2 core SqlView API contains a high-severity SQL injection vulnerability affecting versions 2.37-2.44 that allows authenticated users with SqlView access to exfiltrate database content through error messages. This poses significant risk to health information systems storing sensitive patient and operational data. Organizations must urgently evaluate DHIS2 versions in use and implement compensating controls until a patch is available.
No vendor-released patch identified at time of analysis. Interim mitigations: restrict SqlView access to only essential users; enforce database user privileges to minimum required permissions; disable or mask detailed error messages in DHIS2 responses to prevent SQL injection pattern reflection; implement network segmentation to limit access to the /api/sqlViews/{viewId}/data.json endpoint; monitor database query logs for anomalous SQL patterns; maintain inventory of DHIS2 versions and SqlView usage for prioritized patching once vendor releases fix.
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.
More in PostgreSQL
View allPostgreSQL libpq functions PQescapeLiteral(), PQescapeIdentifier(), PQescapeString(), and PQescapeStringConn() improperl
An issue was discovered in Appsmith before 1.52. Rated critical severity (CVSS 9.8), this vulnerability is remotely expl
Argument injection vulnerability in PostgreSQL 9.2.x before 9.2.4, 9.1.x before 9.1.9, and 9.0.x before 9.0.13 allows re
Unauthenticated arbitrary file write in Splunk Enterprise (below 10.2.4 and 10.0.7) and Splunk Cloud Platform (below 10.
Unauthenticated SQL injection in Sangoma Switchvox SMB Edition 8.3 (build 104997) lets remote attackers execute arbitrar
PostgreSQL versions before 9.2.22, 9.3.18, 9.4.13, 9.5.8 and 9.6.4 are vulnerable to incorrect authentication flaw allow
The build_tablename function in pgsql.c in the PostgreSQL (aka pgsql) extension in PHP through 5.6.7 does not validate t
A vulnerability in the h2oai/h2o-3 REST API versions 3.46.0.4 allows unauthenticated remote attackers to execute arbitra
In PostgreSQL 9.3 through 11.2, the "COPY TO/FROM PROGRAM" function allows superusers and users in the 'pg_execute_serve
Unauthenticated SQL injection in Vendure Shop API allows remote attackers to execute arbitrary SQL commands against the
Parse Server is an open source http web server backend. Rated critical severity (CVSS 10.0), this vulnerability is remot
Hard-coded default PostgreSQL credentials shipped in the docker-compose.yaml of langgenius Dify through version 1.5.1 al
EUVD-2026-46360
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB