Skip to content
High 9.4

Path Traversal in org.openmrs.web:openmrs-web

CVE-2026-40076 First seen on SecPulse

AI summary

Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.

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.

What is the problem

Path traversal (CWE-22) exists in org.openmrs.web:openmrs-web. Attackers reach the vulnerable code path via POST /openmrs/ws/rest/v1/module.

Affected scope

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

Severity: High (CVSS 8.8/10). Successful exploitation can lead to full system takeover.

How to fix

Update to the patched release per vendor advisory.

Workaround

Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.

Detection

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

  1. 1
    Identify exposureidentify
    Audit SBOM/dependencies for affected components.

    資産台帳・SBOM・依存マニフェストで org.openmrs.web:openmrs-web を使っているサービスとバージョンを洗い出す。

  2. 2
    Hunt for indicators of compromisedetect
    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 があれば該当パスのアラート発火履歴を確認。

  3. 3
    Post-deployment verificationverify
    Replay attack against POST /openmrs/ws/rest/v1/module on staging to confirm patch closes the vector

    パッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番では Step 2 と同じログクエリでアラート再発が無いか継続監視。

Affected packages

PackageAffected → Fixed
mavenorg.openmrs.web:openmrs-web
2.8.0 – 2.8.5→ Not listed

This record does not list fixed versions. Check the article or the vendor advisory in the references for whether and where it is fixed.

Original description The description as published by the source.

Affected Versions

version ≤ 2.7.8 (latest version at time of disclosure)

https://github.com/openmrs/openmrs-core

Impact

The endpoint POST /openmrs/ws/rest/v1/module is vulnerable to a path traversal (Zip Slip) attack. An authenticated attacker can upload a crafted .omod archive containing ZIP entries with directory traversal sequences. Upon automatic extraction by the server, the incomplete path validation in WebModuleUtil.startModule() fails to prevent entries such as web/module/../../../../malicious.jsp from being written outside the intended module directory. If the traversal target falls within the web application root (e.g., /usr/local/tomcat/webapps/openmrs/), the attacker achieves arbitrary file write and subsequent Remote Code Execution.

Notably, other extraction methods in the same codebase (ModuleUtil.expandJar(), TestInstallUtil.addZippedTestModules()) are properly protected with normalize().startsWith() checks — this vulnerability is an oversight where the same fix was not applied.

Furthermore, the module.allow_web_admin runtime property, which is intended to restrict administrators from managing modules via the web interface, only gates the Legacy UI controller entry point. The REST API endpoint POST /openmrs/ws/rest/v1/module does not check this property, allowing this restriction to be fully bypassed.

Steps to Reproduce

  1. Construct a malicious .omod file (which is a ZIP/JAR archive) containing a ZIP entry with a path trav…

Source: GitHub Security Advisories (Global) NVD GitHub Advisory

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details