---
id: "CVE-2026-126488"
page: "https://infrastack.ai/live/CVE-2026-126488"
kind: "vulnerability"
aliases: ["CVE-2026-126488"]
title: "OpenEMR: patient portal SQL injection exposes whole database to patients"
severity: "high"
cvss: 8.3
epss: null
exploited: false
status: "open"
category: "other"
products: []
ecosystems: []
tags: ["healthcare", "openemr", "other", "patient-portal", "self-hosted"]
not_affected_if: ["portal-disabled", "version-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-126488", "first_seen_at": "2026-11-13T10:47:26+00:00"}]
exploit_sources: []
---

# OpenEMR: patient portal SQL injection exposes whole database to patients

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

OpenEMR before 8.5.0 has an SQL injection flaw in the patient portal OnsiteDocument.Query endpoint, where the _BitwiseAnd parameters go into SQL unquoted. An authenticated patient can read the whole database, including other patients' records and staff password hashes.

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

## How to check

- Check the installed OpenEMR version against the fixed release, `8.5.0`
- Confirm whether the patient portal is enabled on the deployment

## Fix

- OpenEMR: upgrade to `8.5.0` or later

## Timeline

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

## Documents

- [advisory] Vendor advisory: github.com https://github.com/openemr/openemr/security/advisories/GHSA-g2xw-rvhq-x543
- [advisory] Third-party advisory: www.vulncheck.com https://www.vulncheck.com/advisories/openemr-before-8.5.0-sql-injection-via-onsitedocument-query-bitwiseand

## From the sources

OpenEMR before 8.5.0 contains an SQL injection vulnerability in the patient portal OnsiteDocument.Query endpoint, where mass-assigned _BitwiseAnd criteria parameters are placed unquoted into SQL with only quote-character escaping. Authenticated portal patients can inject SQL outside their per-patient scope to read the entire database, including other patients' demographics and users_secure password hashes.

---

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