CVE-2024-22611
OpenEMR vulnerability analysis and mitigation

Overview

OpenEMR 7.0.2 contains a SQL injection vulnerability in the pharmacy module that can be exploited by authenticated attackers through the web interface. The vulnerability was discovered by Le Quoc Bao from HPT Vietnam Corporation on January 2, 2024, and was assigned CVE-2024-22611. The vulnerability exists due to insufficient input validation in the pharmacy listing functionality (GitHub Advisory).

Technical details

The vulnerability occurs in three main files: \openemr\library\classes\Pharmacy.class.php, \controllers\C_Pharmacy.class.php, and \openemr\controller.php. The issue stems from user-supplied input in the sort parameter being directly concatenated into SQL queries without proper sanitization. The vulnerability has been assigned a CVSS v3.1 score of 9.8 (CRITICAL) with the vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (CISA-ADP).

Impact

The vulnerability can lead to unauthorized access to database information, potential data breach of sensitive medical information, server-side code execution in some cases, and database compromise (GitHub Advisory).

Mitigation and workarounds

Recommended mitigations include implementing strict input validation for all user-supplied parameters, using parameterized queries or prepared statements, applying proper escaping and sanitization of user inputs, implementing proper error handling, using secure database access libraries, following the principle of least privilege for database access, implementing a Web Application Firewall (WAF), conducting regular security audits and penetration testing, and keeping the system and all components up to date (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related OpenEMR vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2024-22611CRITICAL9.8
  • OpenEMROpenEMR
  • cpe:2.3:a:open-emr:openemr
NoYesApr 03, 2025
CVE-2025-43860HIGH7.6
  • OpenEMROpenEMR
  • cpe:2.3:a:open-emr:openemr
NoYesMay 23, 2025
CVE-2025-32794HIGH7.6
  • OpenEMROpenEMR
  • cpe:2.3:a:open-emr:openemr
NoYesMay 23, 2025
CVE-2025-31121HIGH7
  • OpenEMROpenEMR
  • cpe:2.3:a:open-emr:openemr
NoYesApr 01, 2025
CVE-2025-32967MEDIUM5.4
  • OpenEMROpenEMR
  • cpe:2.3:a:open-emr:openemr
NoYesMay 23, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management