<?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 — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/openmrs/</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/tags/openmrs/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><item><title>OpenMRS Stored Velocity SSTI to RCE via ConceptReferenceRange</title><link>https://feed.craftedsignal.io/briefs/2024-01-openmrs-ssti/</link><pubDate>Wed, 03 Jan 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-openmrs-ssti/</guid><description>OpenMRS is vulnerable to a Stored Velocity SSTI to RCE via ConceptReferenceRange, where the `ConceptReferenceRangeUtility.evaluateCriteria()` method evaluates database-stored criteria strings as Apache Velocity templates without a sandbox, allowing unrestricted Java reflection through template expressions, leading to persistent remote code execution and privilege escalation when a user with the `Manage Concepts` privilege stores a malicious Velocity template expression in a concept's reference range criteria field.</description><content:encoded><![CDATA[<p>OpenMRS is vulnerable to a critical security flaw stemming from the unsafe use of Apache Velocity templates. Specifically, the <code>ConceptReferenceRangeUtility.evaluateCriteria()</code> method processes database-stored criteria strings as Velocity templates without any sandbox restrictions. This allows for unrestricted Java reflection through template expressions. A user possessing the <code>Manage Concepts</code> privilege can inject a malicious Velocity template expression into a concept&rsquo;s reference range criteria field. This payload will then execute automatically whenever a user or an API call validates an observation against the compromised concept. This issue impacts OpenMRS versions 2.7.0 through 2.7.8, and 2.8.0 through 2.8.5. Successful exploitation allows an attacker to escalate privileges from content management to arbitrary code execution as the Tomcat application server process, with the potential for exfiltration of protected health information (PHI). The vulnerability is identified as CVE-2026-41258.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker gains access to an OpenMRS account with the <code>Manage Concepts</code> privilege.</li>
<li>The attacker navigates to the concept dictionary management interface.</li>
<li>The attacker locates a commonly used concept, such as one for a standard clinical measurement.</li>
<li>The attacker modifies the concept and injects a malicious Velocity template expression into the concept&rsquo;s reference range criteria field. The expression leverages Java reflection to execute arbitrary code.</li>
<li>The malicious template is saved and stored in the <code>concept_reference_range</code> database table.</li>
<li>A user or API call validates an observation against the affected concept, triggering the execution of the stored Velocity template.</li>
<li>The attacker achieves arbitrary code execution within the context of the Tomcat application server process.</li>
<li>The attacker can then perform actions such as installing a web shell for persistent access or exfiltrating patient data.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability allows for persistent remote code execution on the OpenMRS server. The injected payload persists within the <code>concept_reference_range</code> database table (VARCHAR 65535). A single compromised concept, especially one used for common clinical measurements, can lead to the execution of the malicious payload on every subsequent observation validation across all users, API clients, and integrations. This affects all facilities using the compromised OpenMRS instance. The attacker can escalate privileges from content dictionary management to arbitrary code execution and potentially exfiltrate PHI data.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade OpenMRS to version 2.8.6 or 2.7.9 or later to patch CVE-2026-41258.</li>
<li>Restrict the <code>Manage Concepts</code> privilege to only authorized users, as mentioned in the advisory&rsquo;s workarounds.</li>
<li>Deploy the provided Sigma rule detecting Velocity template injection attempts to your SIEM and tune for your environment.</li>
<li>Implement database monitoring to detect unauthorized modifications to the <code>concept_reference_range</code> table to identify potential exploitation attempts.</li>
</ul>
]]></content:encoded><category domain="severity">critical</category><category domain="type">advisory</category><category>ssti</category><category>rce</category><category>velocity</category><category>openmrs</category></item><item><title>OpenMRS ModuleResourcesServlet Path Traversal Vulnerability</title><link>https://feed.craftedsignal.io/briefs/2024-01-openmrs-path-traversal/</link><pubDate>Wed, 03 Jan 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-openmrs-path-traversal/</guid><description>OpenMRS Core versions 2.7.8 and earlier, as well as versions 2.8.0 through 2.8.5, contain a path traversal vulnerability in the ModuleResourcesServlet, allowing an unauthenticated attacker to read arbitrary files from the server filesystem by manipulating the URL.</description><content:encoded><![CDATA[<p>OpenMRS Core, a widely used open-source medical record system, is vulnerable to a path traversal attack via the <code>ModuleResourcesServlet</code>. This flaw affects versions up to 2.7.8 and versions 2.8.0 through 2.8.5. An unauthenticated attacker can exploit this vulnerability by crafting a malicious URL to read arbitrary files from the server&rsquo;s filesystem. The vulnerability exists because the <code>ModuleResourcesServlet</code> component fails to properly validate user-supplied path input when serving static module resources. This vulnerability is particularly critical because the affected endpoint is not protected by authentication filters, and successful exploitation depends on running Apache Tomcat versions before 8.5.31 or prior to 9.0.10.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>The attacker identifies a vulnerable OpenMRS instance running on a susceptible Tomcat version.</li>
<li>The attacker identifies a valid module ID installed on the target OpenMRS instance (e.g., <code>legacyui</code>).</li>
<li>The attacker crafts a malicious HTTP GET request to the <code>/openmrs/moduleResources/{moduleid}</code> endpoint containing a path traversal sequence (e.g., <code>..;</code>) within the URL. The request attempts to access a sensitive file, such as <code>/etc/passwd</code>.</li>
<li>The <code>ModuleResourcesServlet</code> receives the request and extracts the path information without proper validation.</li>
<li>The application constructs a file path by concatenating the web application root, module path, module ID, &ldquo;resources,&rdquo; and the attacker-supplied path.</li>
<li>Due to missing path sanitization and normalization, the resulting file path points to the attacker-specified file outside the intended resources directory.</li>
<li>The server reads the content of the arbitrary file (e.g., <code>/etc/passwd</code>).</li>
<li>The server returns the file content in the HTTP response to the attacker, resulting in information disclosure.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation allows an unauthenticated attacker to read arbitrary files on the OpenMRS server. This can lead to the exposure of sensitive information, including system configuration files containing database credentials, potentially compromising the entire application and patient data. The number of affected deployments is unknown, but any OpenMRS instance running vulnerable versions on older Tomcat installations is at risk.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade OpenMRS Core to a patched version beyond 2.8.5 to address CVE-2026-40075.</li>
<li>As a short-term mitigation, upgrade Apache Tomcat to version 8.5.31 or later, or 9.0.10 or later, to leverage container-level path traversal protection.</li>
<li>Deploy the following Sigma rule to detect exploitation attempts against the vulnerable <code>ModuleResourcesServlet</code> endpoint.</li>
<li>Monitor web server logs for suspicious URL patterns containing path traversal sequences (<code>../</code>, <code>..;</code>, <code>%2e%2e%2f</code>) targeting the <code>/openmrs/moduleResources/</code> path.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>path-traversal</category><category>information-disclosure</category><category>openmrs</category></item></channel></rss>