OpenEMR Multiple Vulnerabilities
Release Date: 2013-02-15
Criticality level : Highly critical
Impact : Cross Site Scripting
Manipulation of data
System access
Where : From remote
Solution Status : Unpatched
Software: OpenEMR 4.x
Description:
Multiple vulnerabilities have been discovered in OpenEMR, which can be exploited by malicious users to conduct SQL injection attacks and by malicious people to conduct cross-site scripting attacks and compromise a vulnerable system.
1) The library/openflashchart/php-ofc-library/ofc_upload_image.php script allows the upload of files with arbitrary extensions to a folder inside the webroot. This can be exploited to execute arbitrary PHP code by uploading a malicious PHP script.
2) Input passed via the "provider_id" and "pc_category" GET parameters to interface/main/calendar/index.php (when "module" is set to "PostCalendar" and "func" is set to "search") is not properly sanitised before being used in SQL queries. This can be exploited to manipulate SQL queries by injecting arbitrary SQL code.
3) Input passed via the "form_patient_id" GET parameter to interface/reports/chart_location_activity.php is not properly sanitised before being used in SQL queries. This can be exploited to manipulate SQL queries by injecting arbitrary SQL code.
4) Input passed via the "tplview", "pc_category", and "pc_topic" GET parameters to interface/main/calendar/index.php is not properly sanitised before being returned to the user. This can be exploited to execute arbitrary HTML and script code in a user's browser session in context of an affected site.
5) Input passed via the "noteid" POST parameter (when "task" is set to "add") to interface/main/messages/messages.php is not properly sanitised before being returned to the user within an error message. This can be exploited to execute arbitrary HTML and script code in a user's browser session in context of an affected site.
6) Input passed via the "sortby", "sortorder", and "begin" GET parameters to interface/main/messages/messages.php is not properly sanitised before being returned to the user. This can be exploited to execute arbitrary HTML and script code in a user's browser session in context of an affected site.
7) Input passed via the "sortby", "sortorder", and "begin" GET parameters to interface/main/messages/messages.php is not properly sanitised before being used in a SQL query. This can be exploited to manipulate SQL queries by injecting arbitrary SQL code.
The vulnerabilities are confirmed in version 4.1.1. Other versions may also be affected.
Solution:
No official solution is currently available.
Provided and/or discovered by:
1) Gjoko Krstic, Zero Science Lab.
2, 3) Mehdi Boukazoula and Houssam Sahli.
4 - 7) Houssam Sahli.
Original Advisory:
ZSL-2013-5126:
http://www.zeroscience.mk/en/vulnerabilities/ZSL-2013-5126.php
Houssam Sahli:
http://packetstormsecurity.org/files/view/103810/openemr-xss.txt
http://secunia.com/advisories/52145/
Was this reply helpful? (0) (0)
Staff pick