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 `/openmrs/moduleResources/{moduleid}` endpoint is vulnerable to a path traversal attack. The ModuleResourcesServlet constructs a filesystem path from user-controlled input without performing path boundary validation — the getFile() method concatenates the user-supplied path into an absolute filesystem path without calling normalize() or checking that the result stays within the allowed module resources directory. Because this endpoint serves static resources required for rendering the login page, it is not protected by authentication filters, allowing unauthenticated exploitation.
An attacker can traverse directories and read arbitrary files from the server filesystem, including /etc/passwd and application configuration files containing database credentials. Successful exploitation requires the target deployment to run on Apache Tomcat versions prior to 8.5.31, where the ..; path parameter bypass is not mitigated by the container. Deployments on Tomcat 8.5.31 or later and Tomcat 9.0.10 or later are protected at the container level, though the underlying code defect remains. This issue has been fixed in versions after 2.7.8 (within the 2.7.x branch) and in version 2.8.6 and later.
OpenMRS Core versions 2.7.8 and earlier, and 2.8.0-2.8.5 contain an unauthenticated path traversal vulnerability in the moduleResources endpoint that allows attackers to read arbitrary files from the server filesystem. The vulnerability exists because user input is not validated before constructing filesystem paths, and the endpoint lacks authentication protection.
تحتوي نسخ OpenMRS Core 2.7.8 والإصدارات السابقة، وكذلك الإصدارات 2.8.0 إلى 2.8.5 على ثغرة اجتياز مسار في نقطة نهاية /openmrs/moduleResources/{moduleid} التي لا تتطلب مصادقة. يمكن للمهاجمين استغلال هذه الثغرة لقراءة ملفات عشوائية من نظام الملفات بما في ذلك ملفات التكوين وبيانات قاعدة البيانات. تنشأ المشكلة من عدم التحقق من صحة مدخلات المستخدم قبل بناء مسارات نظام الملفات.
OpenMRS Core versions 2.7.8 and earlier, and 2.8.0-2.8.5 contain an unauthenticated path traversal vulnerability in the moduleResources endpoint that allows attackers to read arbitrary files from the server filesystem. The vulnerability exists because user input is not validated before constructing filesystem paths, and the endpoint lacks authentication protection.
Upgrade OpenMRS Core to version 2.7.9 or later, or to version 2.8.6 or later. Implement input validation and path normalization in the ModuleResourcesServlet to ensure user-supplied paths remain within the module resources directory. Apply authentication filters to the moduleResources endpoint or restrict access by IP address. Review server logs for suspicious path traversal attempts.
قم بترقية OpenMRS Core إلى الإصدار 2.7.9 أو أحدث، أو إلى الإصدار 2.8.6 أو أحدث. قم بتنفيذ التحقق من صحة المدخلات وتطبيع المسارات في ModuleResourcesServlet للتأكد من بقاء المسارات المزودة من قبل المستخدم ضمن دليل موارد الوحدة. طبق مرشحات المصادقة على نقطة نهاية moduleResources أو قيد الوصول حسب عنوان IP. راجع سجلات الخادم للكشف عن محاولات اجتياز المسار المريبة.