CVE-2026-39931

OpenEMR Authenticated SQL Injection via backup.php Import Feature

Published Aug 3, 2026 CVSS 4.0 · 8.6 High EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

OpenEMR versions through 8.2.0 contain an authenticated SQL injection flaw in the backup configuration import feature of backup.php. The vulnerability allows users with administrative or super‑ACL rights to upload a specially crafted SQL file, which is then executed by an unfiltered shell_exec call to the MySQL client. As a result, attackers can run arbitrary DDL and DML statements, extract credential hashes, alter access control tables, create backdoor accounts, deploy persistent triggers or stored procedures, and write files to the filesystem when MySQL FILE privileges and permissive secure_file_priv settings are present.

Affected Systems

The product affected is OpenEMR, and the flaw applies to all installations up to and including version 8.2.0. Only accounts that possess administrative or super privileges can trigger the import path, so the issue is limited to users with high‑level access within the application.

Risk and Exploitability

The vulnerability scores an 8.6 on the CVSS scale, indicating a high‑severity impact. EPSS data are not available, so the current likelihood of exploitation cannot be quantified, and the flaw is not listed in the CISA KEV catalog. Attackers must first authenticate as an administrator or super user and then upload a malicious file via the backup.php import form; the exploitation requires MySQL FILE privileges and a permissive secure_file_priv setting to achieve file write or command execution effects.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the vendor‑released patch that eliminates the vulnerable backup import feature or properly sanitizes uploaded SQL files
  • Disable the backup import functionality or restrict it to non‑administrative users to prevent unauthorized uploads
  • Reconfigure MySQL to revoke FILE privileges and set secure_file_priv to a secure, non‑writable directory to block file write and remote command execution paths

Generated by OpenCVE AI on August 4, 2026 at 10:08 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Open-emr
Open-emr openemr
CPEs cpe:2.3:a:open-emr:openemr:*:*:*:*:*:*:*:*
Vendors & Products Open-emr
Open-emr openemr
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Openemr
Openemr openemr
Vendors & Products Openemr
Openemr openemr
Type Values Removed Values Added
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.
Title OpenEMR Authenticated SQL Injection via backup.php Import Feature
Weaknesses CWE-434
References
Metrics cvssV3_1

{'score': 7.2, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H'}

cvssV4_0

{'score': 8.6, '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'}

Weaknesses
  • CWE-434

    Unrestricted Upload of File with Dangerous Type

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Aug 14, 2026, 4:49 PM
Reserved
Apr 7, 2026, 8:57 PM
Status
Analyzed
Published
Aug 3, 2026, 5:16 PM
Modified
Sep 1, 2026, 3:37 PM