Skip to main content

OpenEMR CVE-2026-39931

| EUVDEUVD-2026-52342 HIGH
Unrestricted Upload of File with Dangerous Type (CWE-434)
2026-08-03 VulnCheck GHSA-v687-rxcc-g864
8.6
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Compromise admin-level OpenEMR credentials
  2. Delivery
    Authenticate to backup.php import interface
  3. Exploit
    Upload crafted SQL file at form_step=202
  4. Install
    shell_exec passes file to mysql unfiltered
  5. C2
    Extract credential hashes, inject backdoor accounts
  6. Execute
    Write PHP webshell via MySQL FILE privilege
  7. Impact
    Establish 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
No patch listed yet 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

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

OpenEMR 0 ≤8.2.0

Affected Packages

euvd openemr no fix

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

Vendor (VulnCheck) PRIMARY 8.6 HIGH
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
vuln.today AI 7.2 HIGH

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.

3.1 AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
High
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

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

Why It Matters

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.

Business Impact: High
Compensating Controls

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

EPSS Score
0.3%
Top 75% exploitable
Prevalence
Medium
popular open-source EHR platform in healthcare clinics worldwide
Exploit
POC
Public exploit code exists
Data Quality
7 sources
Confidence: High

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 0.3%
Patch available No
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

63
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +43
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

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.

CVE-2013-10044 HIGH POC
8.7 Aug 01

An authenticated SQL injection vulnerability exists in OpenEMR ≤ 4.1.1 Patch 14 that allows a low-privileged attacker to

CVE-2026-24898 CRITICAL POC
10.0 Mar 03

Unauthenticated token disclosure in OpenEMR before 8.0.0. CVSS 10.0. PoC and patch available.

CVE-2026-24848 CRITICAL POC
9.9 Mar 03

Path traversal in OpenEMR 7.0.4 disposeDocument() allows file access. PoC available.

CVE-2026-24849 CRITICAL POC
9.9 Feb 25

Path traversal in OpenEMR electronic health records before fix allows authenticated users to read arbitrary files on the

CVE-2026-24908 CRITICAL POC
9.9 Feb 25

SQL injection in OpenEMR electronic health records before fix. Authenticated users can execute arbitrary SQL through the

CVE-2024-22611 CRITICAL POC
9.8 Apr 03

OpenEMR 7.0.2 is vulnerable to SQL Injection via \openemr\library\classes\Pharmacy.class.php, \controllers\C_Pharmacy.cl

CVE-2024-37734 CRITICAL POC
9.8 Jun 26

An issue in OpenEMR 7.0.2 allows a remote attacker to escalate privileges viaa crafted POST request using the noteid par

CVE-2026-25146 CRITICAL POC
9.6 Mar 03

Information disclosure in OpenEMR 5.0.2 to before 8.0.0 exposes sensitive data. PoC and patch available.

CVE-2026-39932 CRITICAL POC
9.4 Aug 03

Remote code execution in OpenEMR through 8.2.0 lets an authenticated administrator poison the document category tree so

CVE-2012-0992 HIGH POC
8.5 Feb 07

interface/fax/fax_dispatch.php in OpenEMR 4.1.0 allows remote authenticated users to execute arbitrary commands via shel

CVE-2015-4453 MEDIUM
5.0 Jul 05

interface/globals.php in OpenEMR 2.x, 3.x, and 4.x before 4.2.0 patch 2 allows remote attackers to bypass authentication

CVE-2018-15152 CRITICAL POC
9.1 Aug 15

Authentication bypass vulnerability in portal/account/register.php in versions of OpenEMR before 5.0.1.4 allows a remote

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy