Dhis 2Application · Dhis2

CVE-2021-32704

HIGH · 8.8 CVSS v3.1 Published 2021-06-24
Fix available
A fix is available. Upgrade to 2.34.5 / 2.35.5 or later.
See remediation →
94/100
Remediation priority · Urgent
Remotely reachable Zero-click

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
DHIS 2 is an information system for data capture, management, validation, analytics and visualization. A SQL injection security vulnerability has been found in specific versions of DHIS2. This vulnerability affects the /api/trackedEntityInstances API endpoint in DHIS2 versions 2.34.4, 2.35.2, 2.35.3, 2.35.4, and 2.36.0. Earlier versions, such as 2.34.3 and 2.35.1 and all versions 2.33 and older are unaffected. The system is vulnerable to attack only from users that are logged in to DHIS2, and there is no known way of exploiting the vulnerability without first being logged in as a DHIS2 user. A successful exploit of this vulnerability could allow the malicious user to read, edit and delete data in the DHIS2 instance. There are no known exploits of the security vulnerabilities addressed by these patch releases. However, we strongly recommend that all DHIS2 implementations using versions 2.34, 2.35 and 2.36 install these patches as soon as possible. There is no straightforward known workaround for DHIS2 instances using the Tracker functionality other than upgrading the affected DHIS2 server to one of the patches in which this vulnerability has been fixed. For implementations which do NOT use Tracker functionality, it may be possible to block all network access to POST to the /api/trackedEntityInstance endpoint as a temporary workaround while waiting to upgrade.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

SQL injection vulnerability in DHIS2's /api/trackedEntityInstances endpoint allows authenticated users to read, edit, and delete data in the database. The vulnerability affects versions 2.34.4, 2.35.2-2.35.4, and 2.36.0, with earlier versions unaffected.

MitigationUpgrade DHIS2 to patched versions. For non-Tracker implementations, temporarily block POST requests to /api/trackedEntityInstance as a workaround while planning the upgrade.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
Dhis 2Application
Affected:>= 2.34.4, < 2.34.5>= 2.35.2, < 2.35.5>= 2.36.0, < 2.36.1

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Identify DHIS2 version
    Check the installed DHIS2 version by accessing the /api/system/info endpoint or checking the dhis2.conf configuration file. On the server, you can also check the WAR file name or the database version table.
    Affected if The installed version is 2.34.4, or between 2.35.2 and 2.35.4 inclusive, or is exactly 2.36.0. Versions before 2.34.4 are not affected.
  2. Verify Tracker module is enabled
    In the DHIS2 web interface, go to Apps > Tracker Capture or check the system configuration. Alternatively, query the /api/modules endpoint to see if the 'tracker' module is listed as active.
    Affected if The Tracker module is enabled and accessible. The vulnerability only applies when Tracker is active.
  3. Confirm endpoint accessibility
    Verify that the /api/trackedEntityInstances endpoint is accessible by attempting a GET or POST request with valid authentication credentials, or by checking API configuration.
    Affected if The endpoint responds to authenticated requests. The SQL injection requires a valid authenticated session to exploit.
  4. Review API access logs
    Examine HTTP access logs for the application server (Tomcat, Jetty, etc.) for requests to /api/trackedEntityInstances, focusing on POST requests with unusual parameter patterns that may indicate exploitation attempts.
    Affected if Unusual or suspicious patterns exist in trackedEntityInstances API calls, such as SQL syntax in parameter values.

Your environment is affected if you are running DHIS2 version 2.34.4, 2.35.2-2.35.4, or 2.36.0, AND the Tracker module is enabled, AND the trackedEntityInstances endpoint is accessible to authenticated users.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Upgrade available Upgrade to 2.34.5 / 2.35.5 / 2.36.1 or later
Fixed in 2.34.52.35.52.36.1
Interim mitigation

Upgrade DHIS2 to patched versions. For non-Tracker implementations, temporarily block POST requests to /api/trackedEntityInstance as a workaround while planning the upgrade.

Recommended fix High confidence

2.34.5 (for 2.34.x) | 2.35.5 (for 2.35.x) | 2.36.1 (for 2.36.x)

  1. Identify your current DHIS2 version from the affected ranges (2.34.4, 2.35.2-2.35.4, or 2.36.0)
  2. Backup your DHIS2 database and configuration before proceeding
  3. For implementations NOT using Tracker functionality, temporarily block POST requests to /api/trackedEntityInstances at the web server or firewall level as an interim mitigation
  4. Upgrade DHIS2 to the appropriate fixed version: 2.34.5 if on 2.34.x branch, 2.35.5 if on 2.35.x branch, or 2.36.1 if on 2.36.x branch
  5. Verify the upgrade was successful and the /api/trackedEntityInstances endpoint is functioning correctly
  6. If applied, remove the temporary network blocking workaround for the /api/trackedEntityInstances endpoint
Caveat Standard upgrade best practices apply - test thoroughly in staging environment before production deployment

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Dhis 2 Scoped from the published advisory
  • Consultation3.0 h
  • Implementation6.0 h
  • Testing5.0 h
  • Review / QA3.0 h
17.0 hours of engineering $2,970
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $4,752.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2021-32704 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2021-32704 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data