CVE-2026-40076
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.
Weakness
- CWE-22: Improper Limitation of a Pathname to a Restricted Directory
CISA SSVC decision points
| Exploitation | poc |
|---|---|
| Automatable | no |
| Technical impact | total |
| Scored | 2026-05-07 |
Timeline
- 2026-05-04GitHub advisory published (GHSA-78fc-9688-w8xw)2 days before publication
- 2026-05-06Published by the CNA19:32 UTC
- 2026-05-07CISA SSVC decision recorded1 day after publication
Exploit and advisory records
GitHub advisory GHSA-78fc-9688-w8xw, affected packages:
| Package | Vulnerable versions | Fixed in |
|---|---|---|
| Maven org.openmrs.web:openmrs-web | through 2.7.8 | |
| Maven org.openmrs.web:openmrs-web | from 2.8.0 through 2.8.5 |
Affected products
Products listed as vulnerable. Upgrade to the version under "Fixed in", or a later one.
| Product | Vulnerable versions | Fixed in |
|---|---|---|
| openmrs openmrs | through 2.7.8no fix listedfrom 2.8.0 through 2.8.5no fix listed | not listednot listed |
References
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cve_lookup/CVE-2026-40076'curl 'https://api.contrastcyber.com/cve_risk_score/CVE-2026-40076'curl 'https://api.contrastcyber.com/cve_exploit/CVE-2026-40076'curl 'https://api.contrastcyber.com/cve_products/CVE-2026-40076'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- OWASP Top 10 categories by the OWASP Foundation (CC BY 3.0).
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).