Introduction
In OpenEMR, a Front Office clerk whose entire legitimate job is booking appointments and editing demographics could read every row of the clinical database, assume a patient's portal identity, and sign off forged referrals as clinically authorized. An HHS HC3 alert once described OpenEMR as serving more than 200 million patients, so a chain that turns the lowest meaningful privilege into whole-database disclosure and clinical record forgery is worth understanding in detail.
OpenEMR is an open source electronic medical record and medical practice management system, licensed under the GPL and backed by the nonprofit OpenEMR Foundation. It is one of the most widely deployed free EMR platforms in healthcare, and OpenEMR 8 received ONC Health IT Certification on January 30, 2026. That combination of scale and sensitivity is what makes CVE-2026-126455 worth a close look.
Technical Information
The assigned weakness is CWE-862, Missing Authorization, and the CVE description also includes SQL injection. The core defect is architectural. Many OpenEMR endpoints relied on each individual script to enforce its own access control, and a lot of them simply did not. The CSRF tokens that several of these scripts did check only prove that a request came from the logged-in user's browser. They say nothing about whether that user is allowed to perform the action.
The entry point is an authenticated, low-privilege account. The advisory demonstrates the chain against OpenEMR 8.3.0 using a seeded Front Office clerk holding only patients/appt and patients/demo. Administrator privileges are not required. The chain crosses four distinct security boundaries, and each needs its own protection: database access, patient identity, record ownership, and clinical approval. Repairing one SQL query does not address the full chain.
The seven links
| Component | Defect | Consequence |
|---|---|---|
interface/reports/patient_list.php | No ACL check | Dumps the full patient roster with names, addresses, phones, insurance |
SyndromicsurveillanceTable::fetch_result() | Unparameterized SQL, no ACL | Arbitrary reads of patient_data and users_secure |
interface/patient_file/summary/create_portallogin.php | No ACL check | Sets portal credentials for an open chart; authenticate as that patient |
Portal ORM _BitwiseAnd filter | Injectable criteria | Second arbitrary read path from a patient identity |
interface/patient_file/transaction/add_transaction.php | No patients/trans enforcement, no pid scoping | Read or overwrite another patient's referral or transaction |
interface/main/authorizations/authorizations_full.php | Missing $imauthorized/ACL gate | Forged transactions marked authorized |
interface/patient_file/summary/immunizations.php | No ACL, no pid scoping | Read, modify, or delete another patient's immunization record |
A note on the SQL injection scope
The documented SQL injection paths are read only. The advisory treats response size as a Boolean oracle and also notes error-based extraction. Stacked statements and INTO OUTFILE are rejected. The subtlety that matters: read-only SQL injection does not make the overall chain read only. Record creation, approval, and deletion all flow through the separate authorization defects, not through SQL writes. Reading an administrator bcrypt hash does not establish plaintext recovery or server code execution either.
Attack flow
The reproducer runs the chain in sequence:
- Recon. POST to
patient_list.phpwithform_refresh=trueand receive the full patient roster, since no ACL check runs. - Whole-database read. The Syndromic Surveillance code concatenates the
form_icd_codes[]POST array into anIN (...)clause outside quotes. Calibrating with1) OR (1=1) OR c.id IN (1versus1) OR (1=2) OR c.id IN (1yields a size oracle, then a binary search ASCII/SUBSTRING extraction pulls a patient SSN frompatient_dataand the admin bcrypt hash prefix fromusers_secure. - Patient identity. After
open_chart(PID_B), POST new portal credentials tocreate_portallogin.phpand log into the patient portal as that patient. - Second SQLi path. From the portal account, the
_BitwiseAndfilter is injectable. The PoC confirms with a time-delay oracle usingId_BitwiseAnd=0) OR (SELECT SLEEP(4)) OR (1=0. - Forgery. With the session chart set to patient A, POST to
add_transaction.phpwith patient B'stransidto write a forged referral into patient B's chart. - Laundering. Call
authorizations_full.php?mode=authorize&pid=<victim>, which has only a CSRF check, to flip the forged transaction'sauthorizedcolumn to1. - Destruction. Call
immunizations.php?mode=delete&id=<imm_id>to delete patient B's immunization row.
Proof of Concept
A complete, self-contained public PoC exists. VulnCheck maps CVE-2026-126455 to OpenEMR maintainer advisory GHSA-vr7f-7c3w-49g7, published October 28, 2026, affecting OpenEMR < 8.5.0. The vulnerability was found by an AI agent credited to Google and Ada Logics (AdamKorcz).
The advisory ships a fully executable reproducer:
docker build -t openemr-repro . docker run --rm -v "$(pwd)/findings/90-chain:/workspace/artifacts" openemr-repro
The PoC builds on the unmodified openemr/openemr:latest (8.3.0) image, stands up a private MariaDB, installs OpenEMR, and seeds a realistic clinic using only admin-level APIs, never the bugs under test. The seeded attacker is a Front Office clerk alice / AlicePass123! holding only patients/appt and patients/demo. Its denied ACLs are printed at startup to prove the privilege boundary. Two patients (Alan Alpha, Bella Bravo) with PHI, an immunization, a referral transaction, portal logins, and a reportable ICD9 problem are seeded.
The exploit.py chains the seven defects in sequence. The Link 2 extraction uses a query of the form:
ASCII((SELECT SUBSTRING(password,%d,1) FROM users_secure WHERE username=0x61646D696E))>mid
A shared HTTP client (/poc/oe.py) provides staff login via /interface/main/main_screen.php?auth=login, two-step portal login via /portal/index.php then /portal/get_patient_info.php, chart switching, and CSRF token scraping. The chain prints EXPLOIT SUCCESSFUL when all links pass. The GitHub advisory page itself still displays "No known CVE," but VulnCheck links GHSA-vr7f-7c3w-49g7 to CVE-2026-126455.
Patch Information
The fix is in OpenEMR 8.5.0, released October 27, 2026. Upgrading is the remediation. The 8.5.0 release notes list GHSA-vr7f-7c3w-49g7 first under Security Fixes. Because the CVE covers seven separate flaws, there is no single fix. Many links also have their own advisory in the same release, including GHSA-j467-662w-jwvj (authorizations_full.php), GHSA-xp7w-8fx3-642x (immunizations.php), GHSA-q6f8-4pm7-q39r (Syndromic Surveillance SQLi), GHSA-g2xw-rvhq-x543 and GHSA-vvj8-xpx8-p293 (_BitwiseAnd SQLi), and GHSA-83hq-c876-fcwf (portal credentials).
A caution on the patch commit: both NVD and VulnCheck reference 71da6605dc3bcc1405ee9a65cb9f579ecbc8a1c6. That SHA is the one the reporter's advisory uses in permalinks to point at the vulnerable 8.3.0 code, and the GitHub API returns "No commit found" for it in openemr/openemr. Do not treat it as the fix. The closest public fix change is PR #14627, "chore: optimize report, portal, and transaction entry points," merged October 18, 2026, touching 20 files. The code below comes from the v8_5_0 tag.
Link 1: patient roster report
// Patient-roster report; align the permission check with the other // `patients/pat_rep` reports in this directory. if (!AclMain::aclCheckCore('patients', 'pat_rep')) { AccessDeniedHelper::denyWithTemplate("ACL check failed for patients/pat_rep: Patient List", xl("Patient List")); }
A Front Office clerk does not hold patients/pat_rep, so the request fails before the bulk patient_data query runs. The same missing check was also fixed in unique_seen_patients_report.php, charts_checked_out.php, and services_by_category.php.
Link 2: Syndromic Surveillance SQL injection
if ($code_selected) { $codeIds = is_array($code_selected) ? array_map(static fn ($v): int => (int) $v, $code_selected) : []; if ($codeIds !== []) { $query .= " AND c.id IN (" . implode(',', $codeIds) . ") "; } }
Casting with (int) turns a payload like 1) OR (1=1) OR c.id IN (1 into the plain number 1, so only digits and commas reach the SQL. The same block appears at all four IN sites, in both fetch_result() and generate_hl7().
Link 3: portal credential takeover
if (!AclMain::aclCheckCore('patientportal', 'portal')) { AccessDeniedHelper::denyWithTemplate("ACL check failed for patientportal/portal: Create Portal Login", xl("Patient Portal")); } // The service layer accepts pid=0 and will read/write `patient_access_onsite` // against that value; require an open chart before reaching it. if (!is_numeric($pid) || (int) $pid <= 0) {
The check sits at the top of the file, so a user without permission cannot even view the existing portal username.
Link 4: portal ORM _BitwiseAnd SQL injection
// See _BitwiseOr above: emit an integer literal for this unquoted context. $bitmask = is_numeric($val) ? (int) $val : 0; $this->_where .= $this->_where_delim . " (" . $dbfield . " & " . $bitmask . ")";
The fixed file's comment states the lesson: escaping meant for values inside quotes does not stop injection where the value has no quotes around it. _BitwiseOr got the same fix, and because it is in the shared ORM class it covers every controller passing request parameters into a Criteria object.
Link 5: transaction forgery
$aclReturn = $mode ? ['write', 'addonly'] : ''; if (!AclMain::aclCheckCore('patients', 'trans', '', $aclReturn)) {
if ($sessionPidInt <= 0 || $ownerPid <= 0 || $ownerPid !== $sessionPidInt) { AccessDeniedHelper::deny('add_transaction: transid does not belong to the open chart'); }
Requiring both PIDs to be positive prevents a NULL pid row and an empty session chart from comparing 0 === 0 and passing. This ownership check runs before the UPDATE, the lbt_data writes, and the getTransById() read.
Link 6: laundering via authorizations_full.php
$imauthorized = $session->get('userauthorized') || $see_auth > 2; if (isset($_GET["mode"]) && $_GET["mode"] == "authorize" && $imauthorized) {
Users who are not authorizers can no longer mark billing, forms, notes, or transactions as authorized=1. The fix is a role check rather than the per-chart scoping the reporter also suggested.
Link 7: immunization tampering
$sql = "DELETE FROM immunizations WHERE id = ? AND patient_id = ? LIMIT 1"; sqlStatement($sql, [$_GET['id'], $pid]);
The page now requires patients/med, the add, delete, and added_error modes also require write/addonly, and every statement that takes an id is limited to the session patient. The added_erroneously update and the edit select got the same AND patient_id = ? filter.
What all the fixes share: every link failed the same way, because each script had to remember its own authorization check and many did not. The 8.5.0 fixes add the missing per-script checks and tie record IDs to the open chart. The reporter's suggested larger change, shared bootstraps that deny by default for any script without an explicit permission entry, does not appear in the code reviewed here.
Affected Systems and Versions
OpenEMR versions before 8.5.0 are affected. The GitHub advisory gives the affected range as < 8.5.0 and the patched version as 8.5.0. The public reproducer demonstrates the chain against the openemr/openemr:latest image, which was version 8.3.0 at the time. The default-enabled Syndromic Surveillance module is one of the components reachable without the required authorization checks. OpenEMR 8.5.0 lists PHP 8.3 or later, MariaDB 10.11 or later, and MySQL 8.4 or later as platform requirements.
Vendor Security History
OpenEMR has a documented record of both serious findings and corrective releases. The Project Insecurity assessment of OpenEMR 5.0.1.3 documented SQL injection, portal authentication bypass, and other defects, with project contact in July 2018, a fixing update on July 20, 2018, and public disclosure on August 7, 2018. A later HHS HC3 alert described three vulnerabilities identified by Sonar (unauthenticated file read, authenticated local file inclusion, and authenticated reflected cross-site scripting), reported October 24, 2022 and patched in 7.0.0 on November 30, 2022. These cases show repeated serious findings alongside an established coordinated disclosure and patch process. They do not establish an incident rate or that the present CVE was exploited previously.
References
- NVD: CVE-2026-126455
- CVE Record: CVE-2026-126455
- GitHub Security Advisory GHSA-vr7f-7c3w-49g7
- VulnCheck Advisory
- GitHub API: GHSA-vr7f-7c3w-49g7
- Referenced commit 71da6605
- GitHub API: commit 71da6605
- OpenEMR 8.5.0 Release
- GitHub API: v8_5_0 release
- GitHub API: PR #14627
- OpenEMR Security Policy
- OpenEMR FAQ
- Securing OpenEMR Wiki
- HHS HC3 Sector Alert (January 31, 2023)
- Project Insecurity OpenEMR 5.0.1.3 Report
- CISA Known Exploited Vulnerabilities Catalog
- patient_list.php (v8_5_0)
- SyndromicsurveillanceTable.php (v8_5_0)
- Criteria.php (v8_5_0)
- create_portallogin.php (v8_5_0)
- add_transaction.php (v8_5_0)
- immunizations.php (v8_5_0)
- authorizations_full.php (v8_5_0)



