OpenMRS Core Path Traversal Vulnerability in ModuleResourcesServlet Allowing Arbitrary File Read

Vulnerability

A path traversal vulnerability has been identified in the OpenMRS Core electronic medical record system, specifically in versions 2.7.8 and earlier, as well as 2.8.0 through 2.8.5. The vulnerability exists in the '/openmrs/moduleResources/{moduleid}' endpoint, which is not protected by authentication filters, allowing unauthenticated attackers to exploit the issue. The ModuleResourcesServlet fails to properly validate user-controlled path input, enabling attackers to traverse directories and access arbitrary files on the server, such as '/etc/passwd' and application configuration files containing database credentials. Successful exploitation requires the target deployment to be running on Apache Tomcat versions prior to 8.5.31, where the '..;' path parameter bypass is not mitigated by the container.

Impact

Exploitation of this vulnerability allows for unauthorized directory traversal and arbitrary file reading from the server filesystem, potentially exposing sensitive information such as database credentials and system files like '/etc/passwd'.

Reproduction

To reproduce this vulnerability, send an HTTP request to the '/openmrs/moduleResources/{moduleid}' endpoint with a crafted path that includes directory traversal sequences. The server will respond with the contents of the requested file, such as '/etc/passwd'.

Remediation

Users can upgrade to OpenMRS versions later than 2.7.8 within the 2.7.x branch or to version 2.8.6 and later to address this vulnerability.

Added: May 5, 2026, 10:19 PM
Updated: May 5, 2026, 10:19 PM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
0.8
exploitability
7.6
remediation
0.0
relevance
7.5
threat
6.4
urgency
2.9
incentive
0.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.