Total Tests:

Multiple vulnerabilities in OpenEMR

Advisory ID:HTB23069
Product:OpenEMR
Vendor:OEMR
Vulnerable Versions:4.1.0 and probably prior
Tested Version:4.1.0
Advisory Publication:January 11, 2012 [without technical details]
Vendor Notification:January 11, 2012
Vendor Fix:January 29, 2012
Public Disclosure:February 1, 2012
Latest Update:January 30, 2012
Vulnerability Type:PHP File Inclusion [CWE-98]
OS Command Injection [CWE-78]
CVE References:CVE-2012-0991
CVE-2012-0992
Risk Level:Critical
CVSSv2 Base Scores:7.1 (AV:N/AC:H/Au:S/C:C/I:C/A:C)
9 (AV:N/AC:L/Au:S/C:C/I:C/A:C)
Solution Status:Fixed by Vendor
Discovered and Provided:High-Tech Bridge Security Research Lab
 

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: CVE-2012-0991
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) Arbitrary Command Execution vulnerabilities in OpenEMR: CVE-2012-0992
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%27%20||%20ls%20%3E%20123 %20||
Successful exploitation of this vulnerability requires that the attacker is registered and logged-in.

How to Detect PHP File Inclusion Vulnerabilities
Website Security Test
  • GDPR & PCI DSS Test
  • Website CMS Security Test
  • CSP & HTTP Headers Check
  • WordPress & Drupal Scanning
Try For Free

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.immuniweb.com/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.
[3] Common Vulnerabilities and Exposures (CVE) - http://cve.mitre.org/ - international in scope and free for public use, CVE® is a dictionary of publicly known information security vulnerabilities and exposures.
[4] Common Weakness Enumeration (CWE) - http://cwe.mitre.org - targeted to developers and security practitioners, CWE is a formal list of software weakness types.
Previous Security Advisories with CWE-78:

HTB22922: Multiple Vulnerabilities in phpAlbum.net


Have additional information to submit?
Please feel free to send us any additional information related to this Advisory, such as vulnerable versions, additional exploitation details and conditions, patches and other relevant details.
Book a Call Ask a Question
Close
Talk to ImmuniWeb Experts
ImmuniWeb AI Platform
Have a technical question?

Our security experts will answer within
one business day. No obligations.

Have a sales question?
Email:
Tel: +41 22 560 6800 (Switzerland)
Tel: +1 720 605 9147 (USA)
*
*
*
Your data will stay private and confidential