{"answers":{"affected":"4 open source packages ship an affected version, including org.openmrs.web:openmrs-web. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-40075 exists.","fix":"Upgrade org.openmrs.web:openmrs-web to 2.8.6 or later.","what":"CVE-2026-40075 is a high-severity path traversal vulnerability in openmrs-core, published on 5 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-40075 and fix it if it is affected.\n\nWhat it is: CVE-2026-40075 is a high-severity path traversal vulnerability in openmrs-core, published on 5 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-40075 exists.\n\nAffected packages and fixed versions:\n- org.openmrs.web:openmrs-web (Maven): affected all versions up to 2.7.8; no fix listed\n- org.openmrs.web:openmrs-web (Maven): affected all versions up to 2.7.8; no fix listed\n- org.openmrs.web:openmrs-web (Maven): affected from 2.8.0; fixed in 2.8.6\n- org.openmrs.web:openmrs-web (Maven): affected from 2.8.0; fixed in 2.8.6\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-40075/ (Markdown: https://insights.sbomify.com/CVE-2026-40075/index.md)","id":"CVE-2026-40075","markdown":"https://insights.sbomify.com/CVE-2026-40075/index.md","name":"CVE-2026-40075","record":{"aliases":["GHSA-jjgj-cx3q-pw4w"],"analysis":{"component_type":"web_application","fix_type":"upgrade","impacts":["data_read"],"network_reachable":"yes","non_default_config":true,"product_category":"OpenMRS Core","requires_auth":"none","summary":"Unauthenticated attackers can read arbitrary files, including credentials, via path traversal in OpenMRS Core when running on vulnerable Tomcat versions.","user_interaction":"not_required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"openmrs","vendor":"openmrs"}],"cvss":{"score":8.2,"severity":"high","source":"cna","vector":"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","version":"4.0"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"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.\n\nAn 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.","ecosystems":["Maven"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"OpenMRS Core arbitrary file read via path traversal in ModuleResourcesServlet","id":"CVE-2026-40075","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Maven","product":null,"products":[],"type":"path_traversal","year":"2026"},"n_packages":4,"n_references":1,"next":{"headline":"OpenMRS Core arbitrary file write and code execution via Zip Slip in module upload","id":"CVE-2026-40076"},"packages":[{"ecosystem":"Maven","fixed":[],"introduced":["0"],"last_affected":["2.7.8"],"package":"org.openmrs.web:openmrs-web","purl":null,"source":"GHSA-jjgj-cx3q-pw4w"},{"ecosystem":"Maven","fixed":[],"introduced":["0"],"last_affected":["2.7.8"],"package":"org.openmrs.web:openmrs-web","purl":"pkg:maven/org.openmrs.web/openmrs-web","source":"GHSA-jjgj-cx3q-pw4w"},{"ecosystem":"Maven","fixed":["2.8.6"],"introduced":["2.8.0"],"last_affected":[],"package":"org.openmrs.web:openmrs-web","purl":null,"source":"GHSA-jjgj-cx3q-pw4w"},{"ecosystem":"Maven","fixed":["2.8.6"],"introduced":["2.8.0"],"last_affected":[],"package":"org.openmrs.web:openmrs-web","purl":"pkg:maven/org.openmrs.web/openmrs-web","source":"GHSA-jjgj-cx3q-pw4w"}],"prev":{"headline":"SvelteKit's invalidated redirect in handle hook causes Denial-of-Service","id":"CVE-2026-40074"},"products":["openmrs-core"],"published":"2026-05-05","related":[{"cvss_score":10,"headline":"Deserialization in n/a","id":"CVE-2018-19276","kev_date_added":null,"published":"2019-03-17"},{"cvss_score":9.8,"headline":"SQL injection in n/a","id":"CVE-2021-43094","kev_date_added":null,"published":"2022-05-10"},{"cvss_score":9.8,"headline":"Deserialization in n/a","id":"CVE-2017-12796","kev_date_added":null,"published":"2017-10-23"},{"cvss_score":9.4,"headline":"OpenMRS Core arbitrary file write and code execution via Zip Slip in module upload","id":"CVE-2026-40076","kev_date_added":null,"published":"2026-05-06"},{"cvss_score":8,"headline":"Cross-site request forgery in n/a","id":"CVE-2025-25928","kev_date_added":null,"published":"2025-03-11"},{"cvss_score":7.5,"headline":"Directory Traversal in OpenMRS Startup Filter","id":"CVE-2022-23612","kev_date_added":null,"published":"2022-02-22"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"yes","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2026-05-06","vendors":["openmrs"]},"summary":"Unauthenticated attackers can read arbitrary files, including credentials, via path traversal in OpenMRS Core when running on vulnerable Tomcat versions.","url":"https://insights.sbomify.com/CVE-2026-40075/"}