Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconCompromise admin-level OpenEMR credentials
-
DeliveryAuthenticate to backup.php import interface
-
ExploitUpload crafted SQL file at form_step=202
-
Installshell_exec passes file to mysql unfiltered
-
C2Extract credential hashes, inject backdoor accounts
-
ExecuteWrite PHP webshell via MySQL FILE privilege
-
ImpactEstablish persistent filesystem access
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V5 - File Handling File type validation, storage isolation
MITRE ATT&CK
2 techniques across 2 tactics: Command and Control, Persistence The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires an authenticated session with admin or super ACL privileges in OpenEMR - this is the critical high-privilege prerequisite that limits the attack surface to administrators, compromised admin accounts, or users who have been escalated to that role. The specific vulnerable code path is backup.php with the form_step=202 parameter, which must be reachable by the authenticated session; web server-level access controls blocking this path would prevent exploitation. The primary SQL injection and database manipulation capabilities (credential extraction, ACL modification, backdoor account creation) require only the admin session and are not gated on additional configuration. The most severe secondary capability - writing arbitrary files to the filesystem - requires two additional conditions that must both be true: the MySQL database user account must hold the FILE privilege, and the MySQL server's secure_file_priv variable must be set to an empty string or to a directory within the web root. These are non-default MySQL configurations that may not be present in hardened deployments, meaningfully reducing the file-write exposure in many environments. No victim interaction, timing windows, or race conditions are required once the attacker holds a qualifying admin session. |
| Impact | The CVSS 4.0 score of 8.6 with VC:H/VI:H/VA:H reflects confirmed high impact across all three security pillars once the admin threshold is cleared. The PR:H requirement is the primary risk limiter - this is not an unauthenticated external attack, but any compromised, malicious, or coerced administrator account enables full exploitation with low complexity (AC:L, AT:N). A publicly available exploit exists, substantially lowering the skill floor for post-authentication abuse. No CISA KEV listing is present, so active in-the-wild exploitation is not confirmed; however, the JivaSecurity writeup provides sufficient technical detail for replication. In healthcare environments where OpenEMR is deployed, the database contains PHI, credential hashes, and access control data, amplifying the downstream impact beyond a typical web application compromise. The conditional file write vector - requiring MySQL FILE privilege plus a permissive secure_file_priv setting - is not guaranteed in all deployments, but organizations that have not explicitly hardened MySQL configuration may be exposed to webshell persistence. No EPSS score was provided in the input data, so probability-based exploitation likelihood cannot be quantified. The realistic threat model centers on insider threat, account takeover, and privilege escalation from lower-privilege roles rather than direct external exploitation. |
| Exploit ScenarioDerived | An attacker who has compromised or otherwise obtained OpenEMR administrator credentials authenticates to the application and navigates to the backup import interface, uploading a crafted SQL file through the backup.php form_step=202 endpoint; the server passes this file unfiltered to shell_exec invoking the mysql binary, executing arbitrary DDL and DML against the OpenEMR database. This enables extraction of PHI and bcrypt credential hashes, insertion of backdoor admin accounts into access control tables, and creation of persistent stored procedures or triggers for long-term persistence. Where the MySQL application user holds the FILE privilege and secure_file_priv is permissively configured, the attacker can additionally write a PHP webshell to the web root for persistent server-level code execution; a detailed public writeup is available at the JivaSecurity reference URL. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 03, 2026
SQL injection and arbitrary file write in OpenEMR through 8.2.0 expose the full application database to compromise by any user holding admin or super ACL privileges. The backup configuration import feature at backup.php passes uploaded SQL files directly to a shell_exec invocation of the mysql binary without sanitization, enabling unrestricted DDL and DML execution including credential hash extraction, ACL table manipulation, backdoor account injection, and - under permissive MySQL FILE privilege settings - webshell deployment to the filesystem. A publicly available proof-of-concept exists per VulnCheck and a JivaSecurity exploit writeup; no CISA KEV listing is present, so active exploitation is not confirmed, though the low technical barrier post-authentication makes opportunistic insider exploitation realistic.
RemediationAI
No vendor-released patched version has been independently confirmed from the available data - administrators should monitor the official OpenEMR GitHub repository and the VulnCheck advisory at https://www.vulncheck.com/advisories/openemr-authenticated-sql-injection-via-backup-php-import-feature for a remediation release. In the interim, restrict access to backup.php at the web server level using Apache Location directives or nginx deny rules, limiting it to trusted administrative IP ranges only; this eliminates the network-accessible attack surface without affecting clinical workflows. If the backup import functionality is not operationally required, disable it entirely via web server configuration. Revoke the MySQL FILE privilege from the application's database user (REVOKE FILE ON *.* FROM 'openemr'@'%') and set secure_file_priv to a non-permissive path in my.cnf to eliminate the filesystem write vector; note this has no impact on normal EHR operation. Audit all accounts holding admin or super ACL roles in OpenEMR's access control tables and enforce multi-factor authentication on administrative logins to reduce credential-compromise risk. Review the application database user's DDL rights (CREATE, DROP, ALTER) and revoke any that are not required for routine application operation, accepting the trade-off of potential issues with future schema migrations.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
OpenEMR is a PHP-based open-source electronic health records and practice management platform widely deployed in community health and clinical settings. The vulnerable code path is in backup.php at the form_step=202 parameter, which handles backup configuration imports. Rather than processing uploaded SQL content through a parameterized database layer, the application shells out to the system mysql binary via PHP's shell_exec() with the uploaded file as input - bypassing all query parameterization and input validation. This effectively converts a file upload endpoint into an unconstrained SQL execution interface. NVD formally classifies this as CWE-434 (Unrestricted Upload of File with Dangerous Type), but the mechanism also exhibits characteristics of CWE-78 (OS Command Injection via shell_exec) and CWE-89 (SQL Injection). The mysql client executes with the application's database credentials, which in typical OpenEMR deployments hold broad DDL and DML rights. The CPE string cpe:2.3:a:openemr:openemr:*:*:*:*:*:*:*:* covers all OpenEMR versions through 8.2.0 with no version floor specified.
Know when Openemr gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
Network-accessible endpoint requires high-privilege admin authentication; full C/I/A impact on the database; no scope change to other systems at the base level.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
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.
Executive ViewAI
OpenEMR through version 8.2.0 contains a SQL injection vulnerability in the backup restoration feature that allows administrative users to achieve database compromise, credential extraction, and webshell deployment. Organizations running affected versions face significant insider threat and data breach risk, with no vendor patch currently available to address the vulnerability.
No vendor-released patch identified at time of analysis. Interim mitigations: (1) restrict backup.php access by IP address and role-based authentication to trusted administrators only; (2) disable backup restoration feature if operationally feasible; (3) implement WAF rules to detect and block SQL injection patterns in uploaded files; (4) enable database query logging and audit trail monitoring; (5) conduct insider threat risk assessment of all active administrative users.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.
Malicious file upload attacks exploit insufficient validation when web applications accept user-provided files.
An authenticated SQL injection vulnerability exists in OpenEMR ≤ 4.1.1 Patch 14 that allows a low-privileged attacker to
Unauthenticated token disclosure in OpenEMR before 8.0.0. CVSS 10.0. PoC and patch available.
Path traversal in OpenEMR 7.0.4 disposeDocument() allows file access. PoC available.
Path traversal in OpenEMR electronic health records before fix allows authenticated users to read arbitrary files on the
SQL injection in OpenEMR electronic health records before fix. Authenticated users can execute arbitrary SQL through the
OpenEMR 7.0.2 is vulnerable to SQL Injection via \openemr\library\classes\Pharmacy.class.php, \controllers\C_Pharmacy.cl
An issue in OpenEMR 7.0.2 allows a remote attacker to escalate privileges viaa crafted POST request using the noteid par
Information disclosure in OpenEMR 5.0.2 to before 8.0.0 exposes sensitive data. PoC and patch available.
Remote code execution in OpenEMR through 8.2.0 lets an authenticated administrator poison the document category tree so
interface/fax/fax_dispatch.php in OpenEMR 4.1.0 allows remote authenticated users to execute arbitrary commands via shel
interface/globals.php in OpenEMR 2.x, 3.x, and 4.x before 4.2.0 patch 2 allows remote attackers to bypass authentication
Authentication bypass vulnerability in portal/account/register.php in versions of OpenEMR before 5.0.1.4 allows a remote
EUVD-2026-52342
GHSA-v687-rxcc-g864
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB