CVE-2022-23612: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in openmrs openmrs-core
OpenMRS is a patient-based medical record system focusing on giving providers a free customizable electronic medical record system. Affected versions are subject to arbitrary file exfiltration due to failure to sanitize request when satisfying GET requests for `/images` & `/initfilter/scripts`. This can allow an attacker to access any file on a system running OpenMRS that is accessible to the user id OpenMRS is running under. Affected implementations should update to the latest patch version of OpenMRS Core for the minor version they use. These are: 2.1.5, 2.2.1, 2.3.5, 2.4.5 and 2.5.3. As a general rule, this vulnerability is already mitigated by Tomcat's URL normalization in Tomcat 7.0.28+. Users on older versions of Tomcat should consider upgrading their Tomcat instance as well as their OpenMRS instance.
AI Analysis
Technical Summary
CVE-2022-23612 is a path traversal vulnerability affecting multiple versions of openmrs-core, a widely used open-source electronic medical record (EMR) system designed for healthcare providers. The vulnerability arises from improper sanitization of user-supplied input in HTTP GET requests targeting the `/images` and `/initfilter/scripts` endpoints. Specifically, the application fails to correctly limit pathname inputs to a restricted directory, allowing an attacker to craft requests that traverse directories and access arbitrary files on the underlying server filesystem. The exploitability depends on the permissions of the user account under which the OpenMRS application runs, potentially exposing sensitive files such as configuration files, patient records, or system credentials. The vulnerability affects openmrs-core versions from 1.6 up to but not including 2.1.5, and similarly for minor versions 2.2.0 to 2.2.1, 2.3.0 to 2.3.5, 2.4.0 to 2.4.5, and 2.5.0 to 2.5.3. Mitigation involves upgrading to the latest patched versions within each minor version series. Additionally, the vulnerability is partially mitigated by Tomcat's URL normalization feature available in Tomcat 7.0.28 and later, which normalizes and blocks path traversal attempts. Organizations running older Tomcat versions should upgrade both Tomcat and OpenMRS to reduce risk. No known exploits have been reported in the wild, but the vulnerability's nature and the sensitivity of healthcare data make it a significant concern. The vulnerability is classified under CWE-22 (Improper Limitation of a Pathname to a Restricted Directory), a common and critical web application security issue.
Potential Impact
For European healthcare organizations using OpenMRS, this vulnerability poses a significant risk to the confidentiality and integrity of patient data and other sensitive information. Successful exploitation could allow unauthorized actors to exfiltrate files containing personal health information (PHI), internal configurations, or credentials, potentially leading to data breaches, regulatory non-compliance (e.g., GDPR violations), and reputational damage. The availability impact is lower, as the vulnerability primarily enables information disclosure rather than denial of service. However, attackers could leverage accessed files to escalate privileges or further compromise systems, increasing overall risk. Given the critical role of EMR systems in patient care, any compromise could disrupt healthcare delivery and erode trust. The medium severity rating reflects the balance between the ease of exploitation (no authentication required, user interaction not needed) and the requirement that the attacker can reach the vulnerable endpoints. The scope includes all affected OpenMRS instances running vulnerable versions, especially those deployed in healthcare institutions across Europe.
Mitigation Recommendations
1. Immediate upgrade of openmrs-core to the latest patched versions for the respective minor versions (2.1.5, 2.2.1, 2.3.5, 2.4.5, or 2.5.3) to ensure the vulnerability is addressed. 2. Upgrade Apache Tomcat to version 7.0.28 or later to benefit from URL normalization that mitigates path traversal attempts. 3. Implement strict input validation and sanitization on all user-supplied parameters, especially those used in file path construction, to prevent directory traversal sequences such as '../'. 4. Restrict file system permissions for the OpenMRS application user to the minimum necessary, limiting access to sensitive files and directories. 5. Employ web application firewalls (WAFs) with rules designed to detect and block path traversal patterns targeting the vulnerable endpoints. 6. Conduct regular security audits and penetration testing focused on web application vulnerabilities, including path traversal. 7. Monitor application logs for suspicious access patterns to `/images` and `/initfilter/scripts` endpoints that may indicate exploitation attempts. 8. Educate IT and security staff about the vulnerability and ensure timely patch management processes are in place.
Affected Countries
United Kingdom, Germany, France, Netherlands, Sweden, Belgium, Italy, Spain, Poland, Ireland
CVE-2022-23612: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in openmrs openmrs-core
Description
OpenMRS is a patient-based medical record system focusing on giving providers a free customizable electronic medical record system. Affected versions are subject to arbitrary file exfiltration due to failure to sanitize request when satisfying GET requests for `/images` & `/initfilter/scripts`. This can allow an attacker to access any file on a system running OpenMRS that is accessible to the user id OpenMRS is running under. Affected implementations should update to the latest patch version of OpenMRS Core for the minor version they use. These are: 2.1.5, 2.2.1, 2.3.5, 2.4.5 and 2.5.3. As a general rule, this vulnerability is already mitigated by Tomcat's URL normalization in Tomcat 7.0.28+. Users on older versions of Tomcat should consider upgrading their Tomcat instance as well as their OpenMRS instance.
AI-Powered Analysis
Technical Analysis
CVE-2022-23612 is a path traversal vulnerability affecting multiple versions of openmrs-core, a widely used open-source electronic medical record (EMR) system designed for healthcare providers. The vulnerability arises from improper sanitization of user-supplied input in HTTP GET requests targeting the `/images` and `/initfilter/scripts` endpoints. Specifically, the application fails to correctly limit pathname inputs to a restricted directory, allowing an attacker to craft requests that traverse directories and access arbitrary files on the underlying server filesystem. The exploitability depends on the permissions of the user account under which the OpenMRS application runs, potentially exposing sensitive files such as configuration files, patient records, or system credentials. The vulnerability affects openmrs-core versions from 1.6 up to but not including 2.1.5, and similarly for minor versions 2.2.0 to 2.2.1, 2.3.0 to 2.3.5, 2.4.0 to 2.4.5, and 2.5.0 to 2.5.3. Mitigation involves upgrading to the latest patched versions within each minor version series. Additionally, the vulnerability is partially mitigated by Tomcat's URL normalization feature available in Tomcat 7.0.28 and later, which normalizes and blocks path traversal attempts. Organizations running older Tomcat versions should upgrade both Tomcat and OpenMRS to reduce risk. No known exploits have been reported in the wild, but the vulnerability's nature and the sensitivity of healthcare data make it a significant concern. The vulnerability is classified under CWE-22 (Improper Limitation of a Pathname to a Restricted Directory), a common and critical web application security issue.
Potential Impact
For European healthcare organizations using OpenMRS, this vulnerability poses a significant risk to the confidentiality and integrity of patient data and other sensitive information. Successful exploitation could allow unauthorized actors to exfiltrate files containing personal health information (PHI), internal configurations, or credentials, potentially leading to data breaches, regulatory non-compliance (e.g., GDPR violations), and reputational damage. The availability impact is lower, as the vulnerability primarily enables information disclosure rather than denial of service. However, attackers could leverage accessed files to escalate privileges or further compromise systems, increasing overall risk. Given the critical role of EMR systems in patient care, any compromise could disrupt healthcare delivery and erode trust. The medium severity rating reflects the balance between the ease of exploitation (no authentication required, user interaction not needed) and the requirement that the attacker can reach the vulnerable endpoints. The scope includes all affected OpenMRS instances running vulnerable versions, especially those deployed in healthcare institutions across Europe.
Mitigation Recommendations
1. Immediate upgrade of openmrs-core to the latest patched versions for the respective minor versions (2.1.5, 2.2.1, 2.3.5, 2.4.5, or 2.5.3) to ensure the vulnerability is addressed. 2. Upgrade Apache Tomcat to version 7.0.28 or later to benefit from URL normalization that mitigates path traversal attempts. 3. Implement strict input validation and sanitization on all user-supplied parameters, especially those used in file path construction, to prevent directory traversal sequences such as '../'. 4. Restrict file system permissions for the OpenMRS application user to the minimum necessary, limiting access to sensitive files and directories. 5. Employ web application firewalls (WAFs) with rules designed to detect and block path traversal patterns targeting the vulnerable endpoints. 6. Conduct regular security audits and penetration testing focused on web application vulnerabilities, including path traversal. 7. Monitor application logs for suspicious access patterns to `/images` and `/initfilter/scripts` endpoints that may indicate exploitation attempts. 8. Educate IT and security staff about the vulnerability and ensure timely patch management processes are in place.
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2022-01-19T00:00:00.000Z
- Cisa Enriched
- true
Threat ID: 682d9848c4522896dcbf6278
Added to database: 5/21/2025, 9:09:28 AM
Last enriched: 6/22/2025, 3:07:45 AM
Last updated: 8/3/2025, 3:01:00 AM
Views: 15
Related Threats
CVE-2025-9091: Hard-coded Credentials in Tenda AC20
LowCVE-2025-9090: Command Injection in Tenda AC20
MediumCVE-2025-9092: CWE-400 Uncontrolled Resource Consumption in Legion of the Bouncy Castle Inc. Bouncy Castle for Java - BC-FJA 2.1.0
LowCVE-2025-9089: Stack-based Buffer Overflow in Tenda AC20
HighCVE-2025-9088: Stack-based Buffer Overflow in Tenda AC20
HighActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.