Lucene search
K

OpenEMR 4.1.0 Local File Inclusion / Command Execution

🗓️ 02 Feb 2012 00:00:00Reported by High-Tech Bridge SAType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 33 Views

OpenEMR 4.1.0 Multiple Vulnerabilitie

Code
`Advisory ID: HTB23069  
Product: OpenEMR  
Vendor: OEMR  
Vulnerable Version: 4.1.0 and probably prior  
Tested Version: 4.1.0  
Vendor Notification: 11 January 2012   
Vendor Patch: 29 January 2012   
Public Disclosure: 01 February 2012   
Vulnerability Type: Local File Inclusion, Arbitrary Command Execution  
Solution Status: Fixed by Vendor  
Risk Level: High   
Credit: High-Tech Bridge SA Security Research Lab ( https://www.htbridge.ch/advisory/ )   
  
----------------------------------------------------------------------------------------------------  
  
Advisory Details:  
  
High-Tech Bridge SA Security Research Lab has discovered multiple vulnerabilities in OpenEMR, which can be exploited to perform local file inclusion and arbitrary command execution attacks.  
  
1) Multiple Local File Inclusion vulnerabilities in OpenEMR  
  
1.1 Input passed via the "formname" GET parameter to /contrib/acog/print_form.php is not properly verified before being used to include local files.   
This can be exploited to include local files via directory traversal sequences and URL-encoded NULL bytes.  
  
The following PoC (Proof of Concept) demostrates the vulnerability:  
  
http://[host]/contrib/acog/print_form.php?formname=../../../etc/passwd%00  
  
1.2 Input passed via the "formname" GET parameter to /interface/patient_file/encounter/load_form.php, /interface/patient_file/encounter/view_form.php and /interface/patient_file/encounter/trend_form.php is not properly verified before being used to include local files.   
This can be exploited to include local files via directory traversal sequences and URL-encoded NULL bytes.  
  
The following PoC (Proof of Concept) demostrate the vulnerabilities:  
  
http://[host]/interface/patient_file/encounter/load_form.php?formname=../../../etc/passwd%00  
http://[host]/interface/patient_file/encounter/view_form.php?formname=../../../etc/passwd%00  
http://[host]/interface/patient_file/encounter/trend_form.php?formname=../../../etc/passwd%00  
  
Successful exploitation of these vulnerabilities requires that the attacker is registered and logged-in.  
  
2) Multiple Arbitrary Command Execution vulnerabilities in OpenEMR  
  
Input passed via "file" parameter to /interface/fax/fax_dispatch.php is not properly sanitised before being used in an "exec()" call.   
This can be exploited to execute arbitrary system commands.  
  
The following PoC (Proof of Concept) demostrates the vulnerability:  
  
http://[host]/interface/fax/fax_dispatch.php?file=1%22%20||%20ls%20%3E%20123  
  
Successful exploitation of this vulnerability requires that the attacker is registered and logged-in.  
  
----------------------------------------------------------------------------------------------------  
  
Solution:  
  
Apply Vendor Patch: http://www.open-emr.org/patch/4-1-0-Patch-7.zip  
More information: http://www.open-emr.org/wiki/index.php/OpenEMR_Patches  
  
----------------------------------------------------------------------------------------------------  
  
References:  
  
[1] High-Tech Bridge Advisory HTB23069 - https://www.htbridge.ch/advisory/HTB23069 - Multiple vulnerabilities in OpenEMR.  
[2] OpenEMR - http://www.open-emr.org/ - OpenEMR is a Free and Open Source electronic health records and medical practice management application.  
  
----------------------------------------------------------------------------------------------------  
  
Disclaimer: The information provided in this Advisory is provided "as is" and without any warranty of any kind. Details of this Advisory may be updated in order to provide as accurate information as possible. The latest version of the Advisory is available on web page [1] in the References.  
`

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation