CVE-2026-40076
OpenMRS Core arbitrary file write and code execution via Zip Slip in module upload
Check your servers for CVE-2026-40076
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2026-40076 affects openmrs-core, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
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.
Severity (CVSS)
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
- Attack vector
- network: an attacker can reach the vulnerable part over the network, often from the internet
- Attack complexity
- low: an attack works without special conditions
- Attack requirements
- none: an attack works without special conditions on the target
- Privileges required
- high: the attacker needs an administrative account
- User interaction
- none: nobody has to click or open anything
- Impact on the vulnerable system
- confidentiality high, integrity high, availability high: what an attacker can read, change or stop in the vulnerable component
- Impact on other systems
- confidentiality high, integrity high, availability high: what an attacker can read, change or stop beyond it
Exploitation
EPSS 0.85%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 59.3% of all scored CVEs. Scores of 1 Dec 2026.
The assessment of CISA (SSVC, 7 May 2026):
- Exploitation
- poc: a proof of concept is public
- Automatable
- no: each attack takes manual steps
- Technical impact
- total: full control of the component or of its data
Weakness
- CWE-22 Improper Limitation of a Pathname to a Restricted Directory
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| openmrs-core |
affected <= 2.7.8 affected >= 2.8.0, <= 2.8.5
|
Is my server affected?
Find the installed version of openmrs-core and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.
Debian, Ubuntu
dpkg -l | grep -i openmrs-core
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2026-40076 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2026-40076RHEL, Rocky, Alma, Fedora
rpm -q openmrs-core
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2026-40076Alpine
apk list --installed | grep -i openmrs-coreWith Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2026-40076
trivy image --scanners vuln IMAGE | grep CVE-2026-40076
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Exploits and proof of concept
- https://github.com/openmrs/openmrs-core/security/advisories/GHSA-78fc-9688-w8xw github.com · exploit
Source: the record CVE-2026-40076 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse