Path Traversal in org.openmrs.web:openmrs-web (CVE-2026-40076)
Summary
Path traversal in org.openmrs.web:openmrs-web (CVE-2026-40076). Successful exploitation can lead to full system takeover. Exploitable via POST /openmrs/ws/rest/v1/module.
Original description
The description as published by the source.
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 module upload endpoint at POST /openmrs/ws/rest/v1/module is vulnerable to a Zip Slip path traversal attack. During automatic extraction of uploaded .omod archives in WebModuleUtil.startModule(), ZIP entries under web/module/ are checked only to see whether the full entry path starts with .., and the remaining path is then concatenated into the destination path without normalization or a boundary check. A crafted archive can therefore include entries such as web/module/../../../../malicious.jsp and cause files to be written outside the intended module directory.
An authenticated attacker with module upload access can write arbitrary files to locations such as the web application root and achieve remote code execution by uploading a JSP file and then requesting it. The issue is compounded by the fact that the module.allow_web_admin runtime property is enforced in the legacy UI controller but not in the REST API upload path, so deployments relying on that property to block web-based module administration remain exposed through the REST endpoint. This issue has been fixed in versions after 2.7.8 in the 2.7.x line and in version 2.8.6 and later.
Source: GitHub Security Advisories (Global) NVD GitHub Advisory
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2026-40076 has been found in org.openmrs.web:openmrs-web.
Attackers can target a specific entry point like POST /openmrs/ws/rest/v1/module over the network to misuse the product.
Successful exploitation can lead to full system takeover. CVSS score: 8.8/10.
What to do: apply the vendor's official patched release.
If unsure, ask your IT team or search "org.openmrs.web:openmrs-web CVE-2026-40076" on the vendor's site.
CVE-2026-40076 (org.openmrs.web:openmrs-web) — CWE-22 / CVSS v3 8.8
Attack vector: remote (network-reachable) / no user interaction
Attack surface: POST /openmrs/ws/rest/v1/module / POST /admin/modules/moduleList.form / POST /ws/rest/v1/module / module.allow_web_admin
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
Path traversal (CWE-22) exists in org.openmrs.web:openmrs-web. Attackers reach the vulnerable code path via POST /openmrs/ws/rest/v1/module.
Check the vendor advisory for the affected versions of org.openmrs.web:openmrs-web. Attack surface: POST /openmrs/ws/rest/v1/module / POST /admin/modules/moduleList.form / POST /ws/rest/v1/module / module.allow_web_admin.
Severity: High (CVSS 8.8/10). Successful exploitation can lead to full system takeover.
Update to the patched release per vendor advisory.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual POST /openmrs/ws/rest/v1/module requests with malformed payloads or SQL meta-characters. Audit SBOM/dependencies to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
Audit SBOM/dependencies for affected components.資産台帳・SBOM・依存マニフェストで org.openmrs.web:openmrs-web を使っているサービスとバージョンを洗い出す。
-
2Hunt for indicators of compromise detect
grep 'POST /openmrs/ws/rest/v1/module' /var/log/nginx/access.log | grep -E '(unusual_payload|sqli_pattern)'アクセスログで
POST /openmrs/ws/rest/v1/moduleへの異常なリクエスト (不正な認証ヘッダ・SQLメタ文字)を過去 30〜90日分捜索。WAF/SIEM があれば該当パスのアラート発火履歴を確認。 -
3Post-deployment verification verify
Replay attack against POST /openmrs/ws/rest/v1/module on staging to confirm patch closes the vectorパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番では Step 2 と同じログクエリでアラート再発が無いか継続監視。
Affected packages
References
- advisory github.com
- advisory nvd.nist.gov
- advisory github.com
- package github.com
- web github.com