Skip to main content

OpenEMR CVE-2026-126425

| EUVDEUVD-2026-125018 MEDIUM
SQL Injection (CWE-89)
2026-11-13 VulnCheck GHSA-vm63-33hr-fxhw
4.6
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

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

  1. Access
    Authenticate with admin/super and patients/med write access
  2. Delivery
    Inject SQL into layout field_id via edit_layout.php
  3. Exploit
    Store crafted HIS or source-H LBF field identifier
  4. Execution
    POST to history_save.php for patient lacking a history_data row
  5. Impact
    Execute SQL function inside INSERT (SLEEP worker exhaustion or cross-tenant data read)

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Parameterized queries, prepared statements
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, 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 account holding BOTH admin/super (to add the malicious layout field) AND write or add-only access to patients/med (to trigger the History save). The attacker crafts a field identifier containing SQL - either a HIS field via interface/super/edit_layout.php (which stays stored in layout_options even after the Layout Editor reports it as an invalid column) or a source-'H' field in any LBF* layout (which receives no column validation at all because tableNameFromLayout() returns an empty table name). The crucial precondition is that the target patient must NOT already have a history_data row: opening history.php/history_full.php creates that row, so the payload must be delivered by POSTing directly to history_save.php (or the LBF save) against fresh patient records. The SQL is constrained by the column-identifier length (the demonstrated payload is 24 characters), limiting available expressions. Limiting factors: high operator privilege required, no user interaction, no public auto-exploitation, and the narrow no-history-row target condition - so realistic risk is concentrated in multi-tenant deployments where the scope change permits access beyond the administrator's own tenant.

Impact

This is a genuine but low-urgency issue. The supplied CVSS 4.0 vector (AV:N/AC:H/AT:N/PR:H/UI:N/VC:L/VI:L/VA:L/SC:H/SI:N/SA:N, base 4.6, medium) is dominated by two limiting metrics: AC:H and PR:H. The advisory confirms PR:H in concrete terms - the attacker needs an account holding BOTH admin/super AND write (or add-only) access to patients/med, which is already a highly trusted operator role. The SSVC-style Decision label is 'this_month' (not act_now/emergency), consistent with a self-authorized, high-privilege flaw. No EPSS score and no KEV status were provided in the input, and there is no CISA KEV listing, so there is no signal of active exploitation; exploitation status is best described as a documented proof-of-concept existing in the vendor advisory rather than confirmed in-the-wild use. The impacts are individually low: SLEEP-style payloads tie up database/web workers (availability), compact expressions can surface database-generated values such as version or database name (confidentiality), and crafted keys write into History columns (integrity). The one escalation that matters is SC:H / scope change: in a multi-tenant deployment the injection can reach data beyond what even the administrator is authorized to access. Net assessment - a real, patch-worthy integrity/confidentiality weakness, but NOT an emergency: the high privilege precondition means a single-tenant operator who could abuse this already has near-total control, so the incremental risk concentrates on multi-tenant hosts. EPSS is absent rather than low, so probabilistic exploitation likelihood cannot be stated from the input.

Exploit ScenarioDerived

A user holding admin/super plus patients/med write access (for example a tenant administrator on a shared OpenEMR host) saves a History-layout field whose identifier embeds SQL such as 'tobacco=sleep(3),exams', which survives validation in HIS and source-H LBF layouts. They then POST directly to history_save.php (or an LBF save) for a patient who has no existing history_data row, so the stored identifier is concatenated into the INSERT statement and the SQL function executes. A documented proof-of-concept reproduction procedure exists in the vendor GHSA advisory; given AV:N but AC:H and PR:H, exploitation is remote but requires trusted privileges and a specific no-history-row target.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.3% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Nov 13, 2026

Stored SQL injection in OpenEMR before 8.5.0 allows an account holding both admin/super rights and write (or add-only) access to patients/med to save a crafted History layout field whose identifier contains SQL, which is later concatenated unvalidated into the INSERT that creates a patient's history_data row. Because the trigger only fires for patients who do not yet have a history_data row and the identifier is limited to roughly 24 characters, the demonstrated effect is persistent execution of compact database functions such as SLEEP(3) - tying up database and web workers - or placing database-generated values into a History column, with the meaningful impact concentrated on multi-tenant deployments where the resulting scope change reaches data beyond the administrator's own tenant. A detailed public proof-of-concept procedure is published in the upstream GitHub security advisory; the issue is not listed in CISA KEV and no confirmed active exploitation is reported. This is a genuine but low-urgency issue given the high combined privilege prerequisite and the narrow fresh-patient precondition.

RemediationAI

Vendor-released patch: upgrade to OpenEMR 8.5.0, which is the fixed version per the upstream package data and GHSA-fq58-jp5g-x44q (https://github.com/openemr/openemr/security/advisories/GHSA-fq58-jp5g-x44q). The upstream recommendation is to validate every layout field_id before insertion - including identifiers in vertical LBF* layouts whose source writes to a column-oriented table - to have SocialHistoryService accept only real history_data columns with each identifier quoted, and to wrap the layout metadata insert and schema change in a single transaction so a rejected column cannot remain active. Where upgrading must be deferred, the practical compensating controls are: separate the admin/super role from patients/med write or add-only access so no single account can both plant and trigger a payload (this breaks existing combined administrator workflows); audit layout_options.field_id for backticks, commas, parentheses or other identifier punctuation and remove suspicious HIS and LBF source-'H' fields, noting that deleting a field does not clean history_data rows already written for patients; and ensure every patient record has an existing history_data row so the vulnerable INSERT path is not reached, understanding that opening a patient's History page creates that row and that routine page views therefore silently narrow the attack surface only for patients visited at least once. Monitor for abnormal latency or SLEEP-style delays on history_save.php requests as a detection signal.

Affected VersionsENISA

OpenEMR 0 <8.5.0

Affected Packages

euvd openemr fix: 8.5.0

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/MySQL electronic medical record platform whose Layout Editor (interface/super/edit_layout.php) writes form field definitions into the layout_options table. In the vulnerable flow the supplied newid is inserted into layout_options first, and only afterwards does addOrDeleteColumn() reject punctuation that cannot appear in a column name - with no transaction rolling back the metadata row, a HIS field such as tobacco=sleep(3),exams remains stored and active even though the editor reports an invalid SQL identifier. A source-'H' field in any LBF* layout skips validation entirely because tableNameFromLayout() deliberately returns an empty table name for LBF layouts, so addOrDeleteColumn() returns before checking the identifier. History saving (interface/patient_file/history/history_save.php, or interface/forms/LBF/new.php for LBF saves) reads active fields from layout_options and uses the stored field_id as an array key; SocialHistoryService::insertRecord() parameterizes the values but interpolates those keys between backticks when building "insert into history_data set pid = ?, date = NOW(), uuid = ? ...", never validating them against the real history_data columns. The flaw is CWE-89 (SQL injection) and requires a patient with no existing history_data row, since opening history.php or history_full.php creates that row and taking the normal update path avoids the key-concatenating INSERT; with permissive SQL mode the empty auto-increment id does not block the statement. The identifier length limit constrains the payload, so exploitation yields persistent function execution and data exfiltration of compact expressions rather than arbitrary query control.

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 4.6 MEDIUM
CVSS:4.0/AV:N/AC:H/AT:N/PR:H/UI:N/VC:L/VI:L/VA:L/SC:H/SI:N/SA:N
vuln.today AI 5.5 MEDIUM

PR:H because exploitation needs both admin/super and patients/med write; AC:H for the no-history-row precondition and length-limited payload; S:C as a multi-tenant injection reaches data beyond the administrator's authorization; C/I/A:L for limited data read, column writes, and worker exhaustion.

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

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

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

Lifecycle Timeline

1
Patch available
Nov 13, 2026 - 10:02 EUVD

DescriptionCVE.org

OpenEMR before 8.5.0 contains a stored SQL injection vulnerability in which History layout field identifiers saved through edit_layout.php, including HIS fields and LBF source-H fields, are placed unvalidated into an INSERT statement for patients without a history_data row. Users with admin/super and patients/med write access can trigger history_save.php or LBF saves to execute SQL functions like SLEEP, tying up database workers or accessing data beyond their privileges.

Threat Intelligence Overview

EPSS Score
0.3%
Top 78% exploitable
Prevalence
Low
industry-specific open-source EHR, healthcare-only deployment footprint
Data Quality
5 sources
Confidence: Medium

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 MEDIUM
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.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· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

23
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +23
PoC: 0
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.

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-2026-124450 CRITICAL POC
9.3 Nov 08

Authenticated low-privilege users can exploit OpenEMR before 8.3.0 to read and write arbitrary files through the fax/sms

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

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