<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Openmrs-Web (&lt;= 2.7.8) — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/openmrs-web--2.7.8/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata — refreshed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Mon, 04 May 2026 17:39:31 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/openmrs-web--2.7.8/feed.xml" rel="self" type="application/rss+xml"/><item><title>OpenMRS Module Upload Path Traversal Vulnerability</title><link>https://feed.craftedsignal.io/briefs/2024-01-openmrs-zip-slip/</link><pubDate>Mon, 04 May 2026 17:39:31 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-openmrs-zip-slip/</guid><description>OpenMRS versions 2.7.8 and earlier, as well as versions 2.8.0 through 2.8.5, are vulnerable to a path traversal (Zip Slip) attack via the `POST /openmrs/ws/rest/v1/module` endpoint that allows authenticated attackers to achieve arbitrary file write and remote code execution.</description><content:encoded><![CDATA[<p>OpenMRS, an open-source enterprise electronic medical record system platform, is vulnerable to a path traversal (Zip Slip) vulnerability in its module upload functionality. Discovered in versions 2.7.8 and earlier, as well as versions 2.8.0 through 2.8.5, the vulnerability resides in the <code>POST /openmrs/ws/rest/v1/module</code> endpoint. An authenticated attacker with administrative privileges can exploit this flaw by uploading a specially crafted <code>.omod</code> archive containing malicious ZIP entries with directory traversal sequences. This can allow the attacker to write files outside of the intended module directory, potentially leading to arbitrary file write and remote code execution on the server. The vulnerability stems from incomplete path validation within the <code>WebModuleUtil.startModule()</code> function, an oversight compared to other extraction methods within the same codebase that are properly protected.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>The attacker authenticates to the OpenMRS instance with valid admin credentials via Basic Auth.</li>
<li>The attacker crafts a malicious <code>.omod</code> file containing a ZIP entry with a path traversal payload, such as <code>web/module/../../../../&lt;target_filename&gt;.jsp</code>.</li>
<li>The attacker sends a <code>POST</code> request to the <code>/openmrs/ws/rest/v1/module</code> endpoint, uploading the malicious <code>.omod</code> file.</li>
<li>The server receives the request and parses the uploaded <code>.omod</code> file, treating it as a ZIP archive.</li>
<li>During module loading via <code>WebModuleUtil.startModule()</code>, the server extracts entries under the <code>web/module/</code> directory.</li>
<li>Due to an incomplete check, the entry <code>web/module/../../../../&lt;target_filename&gt;.jsp</code> passes the initial validation.</li>
<li>The server attempts to write the extracted file to a path constructed by concatenating the traversed path, resulting in writing the file outside the intended <code>WEB-INF/view/module/</code> directory.</li>
<li>If the written file is a JSP script, accessing it via a browser triggers server-side execution, achieving Remote Code Execution (RCE).</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability allows an attacker to write arbitrary files within the web application root directory of the OpenMRS instance. This can lead to remote code execution, allowing the attacker to gain complete control of the affected server. Given OpenMRS&rsquo;s use in healthcare environments, a successful attack could compromise sensitive patient data, disrupt medical operations, and damage the reputation of the affected organization. The number of potentially affected installations is unknown, but the vulnerability impacts a widely used version of the platform.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Apply the patch or upgrade to a version of OpenMRS that includes the fix for CVE-2026-40076 to address the path traversal vulnerability.</li>
<li>Deploy the Sigma rule <code>Detect OpenMRS Malicious Module Upload</code> to identify exploitation attempts based on HTTP requests to the <code>/openmrs/ws/rest/v1/module</code> endpoint with suspicious file extensions in the query parameters.</li>
<li>Enable webserver logging to capture HTTP request data and facilitate detection and investigation efforts.</li>
<li>Monitor file creation events within the web application root directory for suspicious JSP files. Use the Sigma rule <code>Detect JSP File Creation in Web Application Root</code> as a starting point.</li>
<li>Enforce the <code>module.allow_web_admin</code> restriction consistently across all module upload entry points, including the REST API to prevent bypass.</li>
</ul>
]]></content:encoded><category domain="severity">critical</category><category domain="type">advisory</category><category>path-traversal</category><category>zip-slip</category><category>rce</category><category>openmrs</category><category>web-application</category></item></channel></rss>