<?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 — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/openmrs-web/</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>Wed, 03 Jan 2024 12:00:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/openmrs-web/feed.xml" rel="self" type="application/rss+xml"/><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>