CVE-2020-29140: 
OpenEMR vulnerability analysis and mitigation

Overview

A SQL injection vulnerability was discovered in OpenEMR versions before 5.0.2.5, specifically in the interface/reports/immunization_report.php file. The vulnerability allows a remote authenticated attacker to execute arbitrary SQL commands via the form_code parameter (NVD, Murat Blog).

Technical details

The vulnerability exists due to ineffective use of the add_escape_custom() function in interface/reports/immunization_report.php line 129. The function is a wrapper for mysqli_real_escape_string(), but its result is not properly enclosed in quotes, leading to SQL injection possibilities. The vulnerability has a CVSS v3.1 Base Score of 7.2 HIGH (Vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H) (NVD, NitroTeam).

Impact

A successful exploitation of this vulnerability could allow an authenticated attacker to execute arbitrary SQL commands on the database server. This could potentially lead to unauthorized access to sensitive medical information, manipulation of database contents, and compromise of the system's integrity (NVD).

Exploitability

The vulnerability requires authentication and can be exploited by sending a specially crafted POST request to the immunization_report.php endpoint with a malicious form_code parameter. The vulnerability has been confirmed to be exploitable on Windows 10 with Apache 2.4, MariaDB 10.3.22, and PHP versions 7.1.33 (OpenEMR 5.0.2(5)) and PHP 7.4 (OpenEMR 6.0.0-dev) (Murat Blog).

Mitigation and workarounds

The vulnerability has been patched in OpenEMR version 5.0.2.5. Users are strongly recommended to upgrade to this version or later. The fix was released on January 7, 2021, as part of a security update (OpenEMR Downloads, OpenEMR Patches).

Community reactions

The vulnerability was discovered by Kutlymurat Mambetniyazov of NitroTeam.kz and was responsibly disclosed to the vendor. The OpenEMR team responded promptly to the report and released a patch within approximately six weeks of the initial disclosure (Murat Blog).

Additional resources


Source: This report was generated using AI

Related OpenEMR vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-40506HIGH7
  • OpenEMR logoOpenEMR
  • cpe:2.3:a:open-emr:openemr
NoYesAug 17, 2026
CVE-2026-76614MEDIUM5.3
  • OpenEMR logoOpenEMR
  • cpe:2.3:a:open-emr:openemr
NoYesAug 19, 2026
CVE-2026-40509MEDIUM5.3
  • OpenEMR logoOpenEMR
  • cpe:2.3:a:open-emr:openemr
NoYesAug 19, 2026
CVE-2026-40508MEDIUM5.1
  • OpenEMR logoOpenEMR
  • cpe:2.3:a:open-emr:openemr
NoYesAug 19, 2026
CVE-2026-40507MEDIUM5.1
  • OpenEMR logoOpenEMR
  • cpe:2.3:a:open-emr:openemr
NoYesAug 19, 2026

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