OpenEMR SQL Injection Vulnerability in MedEx Recall/Reminder Processing

Vulnerability

A SQL injection vulnerability has been identified in OpenEMR versions prior to 8.0.0.3. The issue arises in the MedEx recall and reminder processing code, where several variables are directly concatenated into SQL queries without proper parameterization or type casting. This flaw allows for arbitrary SQL execution, potentially leading to unauthorized access or modification of patient records. The vulnerability exists in the 'generate' method of 'library/MedEx/API.php', where data from unvalidated sources is used to build SQL queries, creating opportunities for SQL injection attacks.

Impact

Exploitation of this vulnerability allows for authenticated SQL injection, with the potential to read or modify patient records in the OpenEMR database.

Reproduction

To reproduce this vulnerability, an administrator must enable the MedEx feature, which is disabled by default. Once MedEx is active, the vulnerability can be exploited by sending a request that includes unvalidated 'facilities' data, which will be processed by the MedEx recall/reminder system. This can be done through the 'interface/main/messages/save.php' file, where the 'facilities' parameter can be injected without proper validation, allowing for SQL injection in the MedEx API.

Remediation

Users can update to OpenEMR version 8.0.0.3 or later, where this vulnerability has been patched.

Added: Mar 25, 2026, 11:25 PM
Updated: Mar 25, 2026, 11:25 PM

Vulnerability Rating

Custom Algorithm
spread
4.5
impact
3.1
exploitability
6.3
remediation
7.7
relevance
4.7
threat
4.8
urgency
2.9
incentive
0.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.