CVE-2026-40075
Description
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.
Weakness
- CWE-22: Improper Limitation of a Pathname to a Restricted Directory
CISA SSVC decision points
| Exploitation | poc |
|---|---|
| Automatable | yes |
| Technical impact | partial |
| Scored | 2026-05-06 |
Timeline
- 2026-05-04GitHub advisory published (GHSA-jjgj-cx3q-pw4w)1 day before publication
- 2026-05-05Published by the CNA21:25 UTC
- 2026-05-06CISA SSVC decision recorded1 day after publication
Exploit and advisory records
GitHub advisory GHSA-jjgj-cx3q-pw4w, affected packages:
| Package | Vulnerable versions | Fixed in |
|---|---|---|
| Maven org.openmrs.web:openmrs-web | through 2.7.8 | |
| Maven org.openmrs.web:openmrs-web | from 2.8.0 before 2.8.6 | 2.8.6 |
Affected products
Products listed as vulnerable. Upgrade to the version under "Fixed in", or a later one.
| Product | Vulnerable versions | Fixed in |
|---|---|---|
| openmrs openmrs | through 2.7.8no fix listedfrom 2.8.0 through 2.8.5no fix listed | not listednot listed |
References
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cve_lookup/CVE-2026-40075'curl 'https://api.contrastcyber.com/cve_risk_score/CVE-2026-40075'curl 'https://api.contrastcyber.com/cve_exploit/CVE-2026-40075'curl 'https://api.contrastcyber.com/cve_products/CVE-2026-40075'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- OWASP Top 10 categories by the OWASP Foundation (CC BY 3.0).
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).