CVE-2026-40075

Source
https://cve.org/CVERecord?id=CVE-2026-40075
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-40075.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-40075
Aliases
Published
2026-05-05T21:25:41.993Z
Modified
2026-08-12T03:51:24.016174501Z
Severity
  • 8.2 (High) CVSS_V4 - CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N CVSS Calculator
Summary
OpenMRS Core arbitrary file read via path traversal in ModuleResourcesServlet
Details

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.

Database specific
{
    "cna_assigner": "GitHub_M",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40075.json",
    "cwe_ids": [
        "CWE-22"
    ]
}
References

Affected packages

Git / github.com/openmrs/openmrs-core

Affected ranges

Type
GIT
Repo
https://github.com/openmrs/openmrs-core
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Last affected
Introduced
Last affected
Database specific
Show details
{
    "source": "CPE_RANGE",
    "cpe": "cpe:2.3:a:openmrs:openmrs:*:*:*:*:*:*:*:*",
    "extracted_events": [
        {
            "introduced": "0"
        },
        {
            "last_affected": "2.7.8"
        },
        {
            "introduced": "2.8.0"
        },
        {
            "last_affected": "2.8.5"
        }
    ]
}

Affected versions

1.*
1.1.0
1.2.0
1.2.01
1.2.01-RC1
1.3.0-RC1
1.3.0-RC2
1.3.0-RC3
1.3.0-RC4
2.*
2.2.0-20181112.082045-243
2.4.0-alpha
2.7.0
2.7.0-alpha
2.7.0-beta
2.7.1
2.7.2
2.7.4
2.7.5
2.7.7
2.7.8
2.8.0
2.8.1
2.8.2
2.8.3
2.8.4
2.8.5

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-40075.json"