Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…
EPSS 0.9%top 45%

CVE-2026-40076: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in openmrs openmrs-core

0
Critical
VulnerabilityCVE-2026-40076cvecve-2026-40076cwe-22
Published: 05/06/2026 (05/06/2026, 19:32:13 UTC)
Source: CVE Database V5
Vendor/Project: openmrs
Product: openmrs-core

Description

OpenMRS Core is an open source electronic medical record system platform. In versions 2.7.8 and earlier and versions 2.8.0 through 2.8.5, the module upload endpoint at POST `/openmrs/ws/rest/v1/module` is vulnerable to a Zip Slip path traversal attack. During automatic extraction of uploaded .omod archives in `WebModuleUtil.startModule()`, ZIP entries under web/module/ are checked only to see whether the full entry path starts with `..,` and the remaining path is then concatenated into the destination path without normalization or a boundary check. A crafted archive can therefore include entries such as `web/module/../../../../malicious.jsp` and cause files to be written outside the intended module directory. An authenticated attacker with module upload access can write arbitrary files to locations such as the web application root and achieve remote code execution by uploading a JSP file and then requesting it. The issue is compounded by the fact that the module.allow_web_admin runtime property is enforced in the legacy UI controller but not in the REST API upload path, so deployments relying on that property to block web-based module administration remain exposed through the REST endpoint. This issue has been fixed in versions after 2.7.8 in the 2.7.x line and in version 2.8.6 and later.

CVSS v4.0

Score 9.4critical

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
High
User Interaction
None
Vuln. Confidentiality
High
Vuln. Integrity
High
Vuln. Availability
High
Subsq. Confidentiality
High
Subsq. Integrity
High
Subsq. Availability
High
CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H

Affected software

org.openmrs/openmrs-core
pkg:maven/org.openmrs/openmrs-core
Affected versions
<=2.7.82.8.0 <=2.8.5

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 05/14/2026, 03:49:10 UTC

Technical Analysis

The vulnerability (CVE-2026-40076) in openmrs-core affects versions up to 2.7.8 and from 2.8.0 to 2.8.5. It is a Zip Slip path traversal issue in the POST /openmrs/ws/rest/v1/module endpoint used for module uploads. The extraction logic in WebModuleUtil.startModule() checks ZIP entry paths only by prefix matching '..,' without proper normalization or boundary enforcement, allowing crafted archives to write files outside the module directory. An attacker with authenticated module upload access can place arbitrary files, such as JSP web shells, in the web application root, enabling remote code execution. The module.allow_web_admin runtime property intended to restrict web-based module administration is not enforced in the REST API path, increasing exposure. The vulnerability is fixed in versions after 2.7.8 (2.7.x line) and from 2.8.6 onwards.

Potential Impact

An authenticated attacker with module upload privileges can exploit this vulnerability to write arbitrary files outside the intended directory, including placing malicious JSP files in the web root. This can lead to remote code execution on the server hosting OpenMRS. The vulnerability bypasses intended administrative restrictions due to inconsistent enforcement of security properties in the REST API. The CVSS 4.0 score is 9.4 (critical), reflecting the high impact and ease of exploitation with high privileges.

Mitigation Recommendations

A fix is available in openmrs-core versions after 2.7.8 in the 2.7.x branch and from 2.8.6 onwards. It is strongly recommended to upgrade to these fixed versions to remediate the vulnerability. Until upgraded, restrict module upload access to trusted users only and consider disabling the REST API module upload endpoint if possible. Verify that the module.allow_web_admin property is consistently enforced across all module management interfaces. Patch status is confirmed by the vendor advisory indicating fixed versions.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-04-09T00:39:12.205Z
Cvss Version
4.0
State
PUBLISHED
Remediation Level
null

Threat ID: 69fb9bbdcbff5d8610414e9f

Added to database: 05/06/2026, 19:51:25 UTC

Last enriched: 05/14/2026, 03:49:10 UTC

Last updated: 07/31/2026, 19:22:58 UTC

Views: 160

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses