Advisory Database
  • Advisories
  • Dependency Scanning
  1. maven
  2. ›
  3. org.openmrs.web/openmrs-web
  4. ›
  5. CVE-2026-40076

CVE-2026-40076: OpenMRS Module Upload Vulnerable to Path Traversal (Zip Slip)

May 4, 2026 (updated May 8, 2026)

The endpoint POST /openmrs/ws/rest/v1/module is vulnerable to a path traversal (Zip Slip) attack. An authenticated attacker can upload a crafted .omod archive containing ZIP entries with directory traversal sequences. Upon automatic extraction by the server, the incomplete path validation in WebModuleUtil.startModule() fails to prevent entries such as web/module/../../../../malicious.jsp from being written outside the intended module directory. If the traversal target falls within the web application root (e.g., /usr/local/tomcat/webapps/openmrs/), the attacker achieves arbitrary file write and subsequent Remote Code Execution.

Notably, other extraction methods in the same codebase (ModuleUtil.expandJar(), TestInstallUtil.addZippedTestModules()) are properly protected with normalize().startsWith() checks — this vulnerability is an oversight where the same fix was not applied.

Furthermore, the module.allow_web_admin runtime property, which is intended to restrict administrators from managing modules via the web interface, only gates the Legacy UI controller entry point. The REST API endpoint POST /openmrs/ws/rest/v1/module does not check this property, allowing this restriction to be fully bypassed.

References

  • github.com/advisories/GHSA-78fc-9688-w8xw
  • github.com/openmrs/openmrs-core/security/advisories/GHSA-78fc-9688-w8xw
  • nvd.nist.gov/vuln/detail/CVE-2026-40076

Code Behaviors & Features

Detect and mitigate CVE-2026-40076 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions up to 2.7.8, all versions starting from 2.8.0 up to 2.8.5

Solution

Unfortunately, there is no solution available yet.

Impact 8.7 HIGH

CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:N

Learn more about CVSS

Weakness

  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Source file

maven/org.openmrs.web/openmrs-web/CVE-2026-40076.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:17:14 +0000.