ZeroHour

CVE-2026-39931

PoC ×2large

Authenticated SQL Injection in OpenEMR Backup Import Feature

CVSS 4.0
8.6 high
EPSS
<1%p37
Published
()
Modified
AI analysis

OpenEMR through version 8.2.0 contains an authenticated SQL injection flaw in the backup configuration import feature of backup.php. An administrator holding admin or super ACL privileges can upload a crafted SQL file via the form_step=202 parameter, which the application passes to the MySQL command-line client through an unfiltered shell_exec call, allowing arbitrary DDL and DML statements to run against the application database. A successful attacker can extract password hashes, modify access-control tables, inject backdoor accounts, create persistent triggers or stored procedures, and where the MySQL user has FILE privileges and permissive secure_file_priv settings write arbitrary files to the server filesystem. All OpenEMR deployments running 8.2.0 or earlier are affected, though exploitation requires a compromised or malicious privileged account rather than anonymous access. No confirmed in-the-wild exploitation exists so far: the issue is not on the CISA KEV list, EPSS estimates a 0.4% probability of exploitation in the next 30 days, and public proof-of-concept writeups are available from Jiva Security and VulnCheck.

What to do: Upgrade to an OpenEMR release newer than 8.2.0 that includes the vendor fix, and limit admin/super ACL privileges to trusted users. Restrict the MySQL account used by the import feature so it lacks FILE privileges or enforce a restrictive secure_file_priv to prevent arbitrary file writes. Audit the database for unexpected triggers, stored procedures, new or backdoor accounts, and access-control changes on any instance where a privileged user may have imported a crafted backup file.

Affected
open-emr OpenEMRthrough 8.2.0 (all releases up to and including 8.2.0)
Estimated exposure
largetens of thousands of deployments / hundreds of thousands of users (order-of-magnitude estimate; OpenEMR is the dominant open-source EHR used by clinics… — OpenEMR's standing as the most widely used open-source EHR across small clinics, community health centers, and international deployments implies a large installed base on the order of tens of thousands of sites, and the admin-auth…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

OpenEMR through 8.2.0 contains an authenticated SQL injection vulnerability in the backup configuration import feature that allows administrators with admin or super ACL privileges to execute arbitrary DDL and DML statements against the application database by uploading a crafted SQL file at the form_step=202 parameter in backup.php. Attackers can exploit the unfiltered shell_exec invocation of the mysql command-line client to extract credential hashes, modify access control tables, inject backdoor accounts, create persistent triggers or stored procedures, and write arbitrary files to the filesystem where MySQL FILE privileges and permissive secure_file_priv settings are configured.

Vendors
open-emr
Products
openemr
Weakness
CWE-434
Vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

In the news

No ingested article mentions this CVE yet.