CVE-2026-40075: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in openmrs openmrs-core
OpenMRS Core versions 2.7.8 and earlier, and 2.8.0 through 2.8.5, contain a path traversal vulnerability in the /openmrs/moduleResources/{moduleid} endpoint. This endpoint serves static resources for the login page and is unauthenticated. The vulnerability arises because the ModuleResourcesServlet constructs filesystem paths from user input without proper normalization or boundary checks, allowing attackers to read arbitrary files on the server. Exploitation requires the server to run on Apache Tomcat versions prior to 8.
AI Analysis
Technical Summary
CVE-2026-40075 is a path traversal vulnerability (CWE-22) in the openmrs-core platform affecting versions <= 2.7.8 and 2.8.0 through 2.8.5. The vulnerability exists in the ModuleResourcesServlet at the /openmrs/moduleResources/{moduleid} endpoint, which constructs filesystem paths from user-controlled input without normalization or path boundary validation. This allows unauthenticated attackers to traverse directories and read arbitrary files on the server filesystem, including sensitive files such as /etc/passwd and configuration files with database credentials. Exploitation depends on the underlying Apache Tomcat version; versions prior to 8.5.31 do not mitigate the ..; path parameter bypass, while Tomcat 8.5.31 and later provide container-level protection. The vulnerability is resolved in openmrs-core versions after 2.7.8 and in 2.8.6 and later.
Potential Impact
Successful exploitation allows unauthenticated attackers to read arbitrary files on the server hosting openmrs-core, potentially exposing sensitive system and application data such as user account information and database credentials. This can lead to further compromise of the system or data breaches. The impact is high due to the unauthenticated nature of the vulnerability and the sensitivity of accessible files. However, the risk is mitigated if the deployment uses Apache Tomcat 8.5.31 or later, which blocks the path traversal at the container level.
Mitigation Recommendations
Upgrade openmrs-core to a fixed version: any version after 2.7.8 in the 2.7.x branch or version 2.8.6 and later. Additionally, ensure that the Apache Tomcat server is updated to version 8.5.31 or later, which provides container-level mitigation against the path traversal bypass. If upgrading openmrs-core is not immediately possible, upgrading Tomcat to a patched version can reduce risk. Patch status is not explicitly stated in the vendor advisory, but the fix is included in the specified versions. No other mitigations are indicated.
CVE-2026-40075: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in openmrs openmrs-core
Description
OpenMRS Core versions 2.7.8 and earlier, and 2.8.0 through 2.8.5, contain a path traversal vulnerability in the /openmrs/moduleResources/{moduleid} endpoint. This endpoint serves static resources for the login page and is unauthenticated. The vulnerability arises because the ModuleResourcesServlet constructs filesystem paths from user input without proper normalization or boundary checks, allowing attackers to read arbitrary files on the server. Exploitation requires the server to run on Apache Tomcat versions prior to 8.
CVSS v4.0
Score 8.2high
Affected software
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-40075 is a path traversal vulnerability (CWE-22) in the openmrs-core platform affecting versions <= 2.7.8 and 2.8.0 through 2.8.5. The vulnerability exists in the ModuleResourcesServlet at the /openmrs/moduleResources/{moduleid} endpoint, which constructs filesystem paths from user-controlled input without normalization or path boundary validation. This allows unauthenticated attackers to traverse directories and read arbitrary files on the server filesystem, including sensitive files such as /etc/passwd and configuration files with database credentials. Exploitation depends on the underlying Apache Tomcat version; versions prior to 8.5.31 do not mitigate the ..; path parameter bypass, while Tomcat 8.5.31 and later provide container-level protection. The vulnerability is resolved in openmrs-core versions after 2.7.8 and in 2.8.6 and later.
Potential Impact
Successful exploitation allows unauthenticated attackers to read arbitrary files on the server hosting openmrs-core, potentially exposing sensitive system and application data such as user account information and database credentials. This can lead to further compromise of the system or data breaches. The impact is high due to the unauthenticated nature of the vulnerability and the sensitivity of accessible files. However, the risk is mitigated if the deployment uses Apache Tomcat 8.5.31 or later, which blocks the path traversal at the container level.
Mitigation Recommendations
Upgrade openmrs-core to a fixed version: any version after 2.7.8 in the 2.7.x branch or version 2.8.6 and later. Additionally, ensure that the Apache Tomcat server is updated to version 8.5.31 or later, which provides container-level mitigation against the path traversal bypass. If upgrading openmrs-core is not immediately possible, upgrading Tomcat to a patched version can reduce risk. Patch status is not explicitly stated in the vendor advisory, but the fix is included in the specified versions. No other mitigations are indicated.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-04-09T00:39:12.205Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 69fa665ccbff5d861029ec6c
Added to database: 5/5/2026, 9:51:24 PM
Last enriched: 5/13/2026, 3:50:18 AM
Last updated: 6/20/2026, 8:43:50 AM
Views: 103
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.