CVE-2026-126491

OpenEMR before 8.5.0 SQL Injection via getByPatientDemographics in patient.inc.php

Published Nov 13, 2026 CVSS 4.0 · 8.3 High EPSS < 1% KEV · Not listed
Description
OpenEMR before 8.5.0 contains a stored SQL injection vulnerability in getByPatientDemographics() where layout_options field_id values are concatenated into the patient search WHERE clause. Attackers with Layout Editor access can plant a malicious field_id, allowing any authenticated low-privilege user to exfiltrate data from patient_data and users_secure tables.

Analysis

AI-generated

Technical impact

The OpenEMR vulnerability is a stored SQL injection occurring in the getByPatientDemographics() routine. An attacker can supply a malicious field_id that is concatenated unchecked into the patient search WHERE clause, allowing the database query to execute arbitrary SQL. Because the query runs with the privileges of the authenticated user, the flaw is classified as CWE‑89 and enables the attacker to read records from the patient_data and users_secure tables. The result is unauthorized data exposure without requiring elevated privileges.

Affected Systems

All OpenEMR installations before version 8.5.0 are vulnerable. No additional sub‑release information is provided, so any build older than 8.5.0 should be considered affected.

Risk and Exploitability

The CVSS score of 8.3 classifies this as high severity, while the EPSS score of less than 1% indicates a very low probability of exploitation at the current time. The vulnerability is not listed in the CISA KEV catalog. To exploit the flaw an attacker must first gain Layout Editor access to inject a harmful field_id; thereafter any authenticated user can trigger the injection and exfiltrate sensitive patient and user data, thereby compromising confidentiality.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade OpenEMR to version 8.5.0 or later to eliminate the vulnerable code.
  • Restrict Layout Editor permissions to trusted administrators and verify that low‑privilege accounts cannot create or modify layout fields.
  • If an immediate upgrade is not possible, sanitise or escape all field_id values before incorporating them into SQL queries to block injection.

Generated by OpenCVE AI on November 14, 2026 at 16:31 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, '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 before 8.5.0 contains a stored SQL injection vulnerability in getByPatientDemographics() where layout_options field_id values are concatenated into the patient search WHERE clause. Attackers with Layout Editor access can plant a malicious field_id, allowing any authenticated low-privilege user to exfiltrate data from patient_data and users_secure tables.
Title OpenEMR before 8.5.0 SQL Injection via getByPatientDemographics in patient.inc.php
First Time appeared Open-emr
Open-emr openemr
Weaknesses CWE-89
CPEs cpe:2.3:a:open-emr:openemr:*:*:*:*:*:*:*:*
Vendors & Products Open-emr
Open-emr openemr
References
Metrics cvssV3_1

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

cvssV4_0

{'score': 8.3, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:L/VA:N/SC:H/SI:L/SA:N'}

Weaknesses
  • CWE-89

    Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Nov 17, 2026, 1:59 PM
Reserved
Nov 10, 2026, 9:45 PM
Status
Modified
Published
Nov 13, 2026, 10:17 AM
Modified
Nov 17, 2026, 2:17 PM