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 constructs filesystem paths from user input without proper normalization or boundary checks, allowing unauthenticated attackers to read arbitrary files on the server. The vulnerability is exploitable only on deployments running Apache Tomcat versions prior to 8. 5.
AI Analysis
Technical Summary
The OpenMRS Core platform has a CWE-22 path traversal vulnerability in the ModuleResourcesServlet endpoint /openmrs/moduleResources/{moduleid} in affected versions. The servlet concatenates user-supplied path input into an absolute filesystem path without normalization or boundary validation, enabling directory traversal. Because this endpoint serves static resources needed for the login page, it is accessible without authentication. Exploitation allows reading arbitrary files such as /etc/passwd or configuration files containing sensitive data. The vulnerability is exploitable only on Apache Tomcat versions prior to 8.5.31 due to lack of container-level mitigation for the ..; path bypass. OpenMRS versions after 2.7.8 and from 2.8.6 and later include fixes for this issue, though the underlying code defect remains and relies on Tomcat container protections in later versions.
Potential Impact
Successful exploitation allows unauthenticated attackers to read arbitrary files on the server filesystem, including sensitive system files and application configuration files that may contain database credentials. This can lead to information disclosure and potentially further compromise of the affected system. The vulnerability is rated high severity with a CVSS 4.0 score of 8.2. Exploitation is limited to deployments running vulnerable OpenMRS versions on Apache Tomcat versions prior to 8.5.31.
Mitigation Recommendations
The vulnerability is fixed in OpenMRS versions after 2.7.8 (within the 2.7.x branch) and in version 2.8.6 and later. Deployments should upgrade to these fixed versions to remediate the issue. Additionally, running Apache Tomcat version 8.5.31 or later or 9.0.10 or later provides container-level mitigation against the path traversal bypass. Since the underlying code defect remains in later OpenMRS versions, maintaining an updated Tomcat container is important. Patch status is not explicitly confirmed by a vendor advisory here, so verify current remediation guidance from OpenMRS official sources before deployment.
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 constructs filesystem paths from user input without proper normalization or boundary checks, allowing unauthenticated attackers to read arbitrary files on the server. The vulnerability is exploitable only on deployments running Apache Tomcat versions prior to 8. 5.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The OpenMRS Core platform has a CWE-22 path traversal vulnerability in the ModuleResourcesServlet endpoint /openmrs/moduleResources/{moduleid} in affected versions. The servlet concatenates user-supplied path input into an absolute filesystem path without normalization or boundary validation, enabling directory traversal. Because this endpoint serves static resources needed for the login page, it is accessible without authentication. Exploitation allows reading arbitrary files such as /etc/passwd or configuration files containing sensitive data. The vulnerability is exploitable only on Apache Tomcat versions prior to 8.5.31 due to lack of container-level mitigation for the ..; path bypass. OpenMRS versions after 2.7.8 and from 2.8.6 and later include fixes for this issue, though the underlying code defect remains and relies on Tomcat container protections in later versions.
Potential Impact
Successful exploitation allows unauthenticated attackers to read arbitrary files on the server filesystem, including sensitive system files and application configuration files that may contain database credentials. This can lead to information disclosure and potentially further compromise of the affected system. The vulnerability is rated high severity with a CVSS 4.0 score of 8.2. Exploitation is limited to deployments running vulnerable OpenMRS versions on Apache Tomcat versions prior to 8.5.31.
Mitigation Recommendations
The vulnerability is fixed in OpenMRS versions after 2.7.8 (within the 2.7.x branch) and in version 2.8.6 and later. Deployments should upgrade to these fixed versions to remediate the issue. Additionally, running Apache Tomcat version 8.5.31 or later or 9.0.10 or later provides container-level mitigation against the path traversal bypass. Since the underlying code defect remains in later OpenMRS versions, maintaining an updated Tomcat container is important. Patch status is not explicitly confirmed by a vendor advisory here, so verify current remediation guidance from OpenMRS official sources before deployment.
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/5/2026, 10:06:38 PM
Last updated: 5/5/2026, 10:55:56 PM
Views: 3
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.