Dhis 2Application · Dhis2

CVE-2021-41187

HIGH · 8.8 CVSS v3.1 Published 2021-11-01
Fix available
A fix is available. Upgrade to after 2.36.3 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 endpoints for /api/trackedEntityInstances and api/events in DHIS2. 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.32, 2.33, 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 and /api/events endpoints 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 API endpoints (/api/trackedEntityInstances and /api/events) affecting versions 2.32-2.36. Exploitation requires authenticated user access and allows attackers to read, edit, and delete data in the DHIS2 database.

MitigationPrimary: Upgrade DHIS2 to patched versions. Temporary workaround for non-Tracker implementations: block POST requests to /api/trackedEntityInstance and /api/events endpoints at the network level while planning 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.32.0, <= 2.32.7>= 2.33.0, <= 2.33.9>= 2.34.0, <= 2.34.6>= 2.35.0, <= 2.35.7>= 2.36.0, <= 2.36.3

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
    Retrieve the installed DHIS2 version via the /api/system/info endpoint or check the WAR file version metadata
    Affected if The installed version falls within 2.32.0-2.32.7, 2.33.0-2.33.9, 2.34.0-2.34.6, 2.35.0-2.35.7, or 2.36.0-2.36.3
  2. Confirm Tracker module is enabled
    Verify that the DHIS2 Tracker functionality is active by querying the /api/configuration endpoint or checking if /api/trackedEntityInstances and /api/events endpoints respond to requests
    Affected if Tracker module is enabled and the API endpoints are accessible
  3. Check API endpoint exposure
    Attempt a GET request to /api/trackedEntityInstances and /api/events endpoints to confirm they are reachable over the network
    Affected if These endpoints are exposed and accept requests from authenticated users
  4. Verify authentication is required
    Confirm that the DHIS2 API requires authentication by testing endpoint access with and without valid credentials
    Affected if The system accepts authenticated requests to the vulnerable endpoints (exploitation requires authenticated access)

A DHIS2 instance is affected if it runs a version between 2.32.0 and 2.36.3, has the Tracker module enabled, exposes the /api/trackedEntityInstances or /api/events endpoints, and accepts authenticated API requests.

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 a release after 2.36.3
Interim mitigation

Primary: Upgrade DHIS2 to patched versions. Temporary workaround for non-Tracker implementations: block POST requests to /api/trackedEntityInstance and /api/events endpoints at the network level while planning upgrade.

Recommended fix Moderate confidence

Upgrade to the next available patched release in your version branch (e.g., 2.32.8+, 2.33.10+, 2.34.7+, 2.35.8+, or 2.36+)

  1. Identify your current DHIS2 version from the affected list (2.32.0-2.32.7, 2.33.0-2.33.9, 2.34.0-2.34.6, or 2.35.0-2.35.7)
  2. Obtain the patched release for your version branch from the official DHIS2 GitHub releases page (github.com/dhis2/dhis2-core)
  3. Plan maintenance window as upgrade will require server restart
  4. Back up your DHIS2 database before proceeding
  5. Stop the DHIS2 application server
  6. Deploy the patched release corresponding to your version branch
  7. Start the DHIS2 application server
  8. Verify the application starts successfully and API endpoints respond
Caveat Standard DHIS2 upgrade precautions apply - test in staging environment first, review release notes for any breaking changes in your version path

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

Fix this in Dhis 2 Scoped from the published advisory
  • Consultation6.0 h
  • Implementation12.0 h
  • Testing8.0 h
  • Review / QA4.0 h
30.0 hours of engineering $5,280
Get the upgrade done

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

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2021-41187 — 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-41187 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