CVE-2023-22974
OpenEMR vulnerability analysis and mitigation

Overview

A Path Traversal vulnerability (CVE-2023-22974) was discovered in OpenEMR versions prior to 7.0.0. The vulnerability exists in the setup.php file, allowing remote unauthenticated users to read arbitrary files by controlling a connection to an attacker-controlled MySQL server (OpenEMR Patches, SonarSource Blog).

Technical details

The vulnerability stems from the installer not being deleted after installation and the setup being divided into several steps that unauthenticated users can access. An attacker can specify configuration during setup steps by setting properties of the Installer class. When the displayNewThemeDiv method is called, it executes a MySQL query to read the current theme. Since no database connection is established, a new one is created with attacker-controlled properties. Using a malicious MySQL server, an attacker can exploit the LOAD DATA LOCAL INFILE feature to read arbitrary files from the client system (SonarSource Blog).

Impact

The vulnerability allows unauthenticated attackers to read sensitive files from the OpenEMR server, including certificates, passwords, tokens, and backups. This access to sensitive data could potentially lead to further system compromise and unauthorized access to patient information (SonarSource Blog).

Exploitability

The vulnerability is exploitable by unauthenticated remote attackers. The exploit requires the attacker to set up a malicious MySQL server and convince the OpenEMR instance to connect to it. The vulnerability is particularly severe because it requires no authentication and can be exploited if the OpenEMR instance has mysqli.allow_local_infile=On configured, which is a common setting (SonarSource Blog).

Mitigation and workarounds

The vulnerability has been patched in OpenEMR version 7.0.0. Users should upgrade to this version or later to protect against this vulnerability. Additionally, organizations should ensure proper security configurations and access controls are in place (OpenEMR Patches).

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-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