CVE-2026-40075
HighCVSS 7.5Exploitation Probability (EPSS)
Low risk43th percentile - higher than 43% of all known CVEs
Summary
OpenMRS Core up to version 2.7.8 and versions 2.8.0-2.8.5 contain a path traversal vulnerability in the `/openmrs/moduleResources/{moduleid}` endpoint. The getFile() function does not validate the path, allowing an unauthenticated attacker to read arbitrary files, including /etc/passwd and configuration files with database credentials. Exploitation is only possible on Apache Tomcat versions prior to 8.5.31.
Risk Assessment
An attacker can access sensitive data such as database passwords, potentially leading to full system compromise.
Recommendation
Update OpenMRS Core to version 2.7.9 (for 2.7.x branch) or 2.8.6 (for 2.8.x branch) and ensure Apache Tomcat is version 8.5.31 or later.
Other vulnerabilities in OpenMRS Core
See all- CVE-2026-40076High
OpenMRS Core versions 2.7.8 and earlier and 2.8.0 through 2.8.5 are vulnerable to a Zip Slip attack that allows an attacker to upload malicious files. Due to improper path checking during the automatic extraction of .omod archives, files can be written outside the intended module directory.
- CVE-2026-41258Critical
In OpenMRS, from version 2.7.0 to before 2.7.9 and 2.8.6, the ConceptReferenceRangeUtility.evaluateCriteria() method evaluates database-stored criteria as Apache Velocity templates without proper sandbox configuration. This allows unrestricted Java reflection through template expressions.
Original NVD description (English source)
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 `/openmrs/moduleResources/{moduleid}` endpoint is vulnerable to a path traversal attack. The ModuleResourcesServlet constructs a filesystem path from user-controlled input without performing path boundary validation — the getFile() method concatenates the user-supplied path into an absolute filesystem path without calling normalize() or checking that the result stays within the allowed module resources directory. Because this endpoint serves static resources required for rendering the login page, it is not protected by authentication filters, allowing unauthenticated exploitation. An attacker can traverse directories and read arbitrary files from the server filesystem, including /etc/passwd and application configuration files containing database credentials. Successful exploitation requires the target deployment to run on Apache Tomcat versions prior to 8.5.31, where the ..; path parameter bypass is not mitigated by the container. Deployments on Tomcat 8.5.31 or later and Tomcat 9.0.10 or later are protected at the container level, though the underlying code defect remains. This issue has been fixed in versions after 2.7.8 (within the 2.7.x branch) and in version 2.8.6 and later.

