CVE-2023-31139
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 · uneditedDHIS2 Core contains the service layer and Web API for DHIS2, an information system for data capture. Starting in the 2.37 branch and prior to versions 2.37.9.1, 2.38.3.1, and 2.39.1.2, Personal Access Tokens (PATs) generate unrestricted session cookies. This may lead to a bypass of other access restrictions (for example, based on allowed IP addresses or HTTP methods). DHIS2 implementers should upgrade to a supported version of DHIS2: 2.37.9.1, 2.38.3.1, or 2.39.1.2. Implementers can work around this issue by adding extra access control validations on a reverse proxy.
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 confidencePersonal Access Tokens (PATs) in DHIS2 Core generate unrestricted session cookies that bypass access controls based on IP addresses or HTTP methods. This allows authenticated users with PATs to circumvent configured security restrictions.
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>= 2.37.0, < 2.37.9.1>= 2.38.0, < 2.38.3.1>= 2.39.0, < 2.39.1.2CVSS 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
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- None
- Availability
- None
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
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 checksWork through these to decide whether this CVE applies to you.
-
Determine DHIS2 versionQuery the DHIS2 API system info endpoint at /api/system/info or check the WAR file name in the deployment directory. Alternatively, check the dhis.conf file for version information.Affected if The installed version falls within the affected ranges: 2.37.0 to 2.37.9.0, 2.38.0 to 2.38.3.0, or 2.39.0 to 2.39.1.1.
-
Verify if Personal Access Tokens are in useCheck the DHIS2 database for entries in the oauth_client table or query the /api/oAuth2Clients endpoint if accessible. PATs are stored as oauth clients with grant_type 'refresh_token'.Affected if PATs have been created and are actively used for API authentication.
-
Confirm IP-based access restrictions are configuredInspect the dhis.conf file for 'system.ip_ranges' or 'security.ip_ranges' settings. Check if any IP whitelisting or blacklisting rules are defined in the DHIS2 security configuration.Affected if IP-based access controls are configured but the system relies on DHIS2 session cookies for enforcement.
-
Check HTTP method restrictionsReview any configured HTTP method restrictions in the application server (Tomcat) configuration, reverse proxy (nginx/apache), or DHIS2 security settings that limit certain HTTP methods by user or token type.Affected if HTTP method restrictions are configured but rely on session cookie validation that PATs bypass.
You are affected if your DHIS2 version is within the vulnerable ranges AND you use Personal Access Tokens while relying on IP-based or HTTP method access controls for security.
Generated from the published advisory. Verify against your own configuration.
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 · scoped2.37.9.12.38.3.12.39.1.2
Upgrade DHIS2 to version 2.37.9.1, 2.38.3.1, or 2.39.1.2 to receive the patch. Alternatively, implement additional access control validation at the reverse proxy layer as a compensating control.
2.37.9.1 (for 2.37.x) or 2.38.3.1 (for 2.38.x) or 2.39.1.2 (for 2.39.x)
- 1. Identify the currently running DHIS2 version using the /api/system/info endpoint or the About dialog in the UI
- 2. Based on your current version branch, plan upgrade to the appropriate fixed release: 2.37.9.1 for 2.37.x, 2.38.3.1 for 2.38.x, or 2.39.1.2 for 2.39.x
- 3. Review the DHIS2 upgrade guide and release notes for your target version to understand any prerequisites
- 4. Perform a full backup of the database and DHIS2 configuration files before proceeding
- 5. Stop the DHIS2 application server
- 6. Upgrade DHIS2 to the target fixed version following standard upgrade procedures (typically replacing the DHIS2 WAR file)
- 7. Restart the DHIS2 application server
- 8. Verify the upgrade was successful by checking the version in /api/system/info
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation3.0 h
- Implementation6.0 h
- Testing4.0 h
- Review / QA2.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $4,224.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2023-31139 — 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 sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2023-31139 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
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.
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.
- 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