---
id: "CVE-2026-126491"
page: "https://infrastack.ai/live/CVE-2026-126491"
kind: "vulnerability"
aliases: ["CVE-2026-126491"]
title: "OpenEMR: stored SQL injection lets users read patient and credential data"
severity: "high"
cvss: 8.3
epss: null
exploited: false
status: "open"
category: "other"
products: [{"name": "OpenEMR", "fixed": [], "affected": "", "ecosystem": "vendor"}]
ecosystems: ["vendor"]
tags: ["healthcare", "openemr", "other", "self-hosted"]
not_affected_if: ["openemr-8.5.0-or-later"]
published_at: "2026-11-13T10:17:59+00:00"
first_seen_at: "2026-11-13T10:47:26+00:00"
updated_at: "2026-11-13T10:51:08+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-126491", "first_seen_at": "2026-11-13T10:47:26+00:00"}]
exploit_sources: []
---

# OpenEMR: stored SQL injection lets users read patient and credential data

Link for people: https://infrastack.ai/live/CVE-2026-126491 (this .md is for agents)

OpenEMR, an electronic health records system, concatenates layout field IDs into its patient search SQL query without escaping them. A user who can edit form layouts can plant a malicious field ID that lets any logged-in low-privilege user extract data from the patient and user-credential tables.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- vendor:OpenEMR affected range not listed fixed no fixed version listed

## How to check

- Check the installed OpenEMR version in the admin footer or `version.php`; versions below `8.5.0` are listed as affected.
- Review who holds Layout Editor access in the admin settings.

## Fix

- Upgrade OpenEMR to `8.5.0` or later.

## Timeline

- 2026-11-13T10:47:26+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-126491

## Documents

- [advisory] Vendor advisory: github.com https://github.com/openemr/openemr/security/advisories/GHSA-pc2q-9pcw-v899
- [advisory] Third-party advisory: www.vulncheck.com https://www.vulncheck.com/advisories/openemr-before-8.5.0-sql-injection-via-getbypatientdemographics-in-patient-inc-php

## From the sources

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.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
