CVE-2026-40076 Details
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.
A path traversal vulnerability allowing for Zip Slip attacks has been identified in OpenMRS Core versions 2.7.8 and earlier, as well as in versions 2.8.0 through 2.8.5. The issue arises in the module upload endpoint at POST '/openmrs/ws/rest/v1/module', where uploaded .omod files are automatically extracted. The extraction process in 'WebModuleUtil.startModule()' fails to properly validate ZIP entry paths, allowing crafted archives to write files outside the intended directory. An authenticated attacker with module upload privileges can exploit this flaw to execute arbitrary code by uploading a malicious JSP file and accessing it through the web application.
Users should update to OpenMRS Core versions later than 2.7.8 in the 2.7.x line or version 2.8.6 and later. Additionally, ensure that the 'module.allow_web_admin' property is consistently enforced across all module upload entry points, including the REST API.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed May 7, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/openmrs/openmrs-core/security/advisories/GHSA-78fc-9688-w8xw | CISA-ADP | ExploitMitigationVendor Advisory |
| https://github.com/openmrs/openmrs-core/security/advisories/GHSA-78fc-9688-w8xw | [email protected] | ExploitMitigationVendor Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-22 | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| openmrs openmrs | <= 2.7.8 >= 2.8.0, <= 2.8.5 |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| May 11, 2026 | Initial Analysis | [email protected] |
| May 7, 2026 | CVE Modified | CISA-ADP |
| May 6, 2026 | New CVE Received | [email protected] |