Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate as enrolled portal patient
-
DeliverySend crafted OnsiteDocument.Query API request
-
ExploitInject SQL via unquoted Id_BitwiseAnd parameter
-
ExecutionBreak per-patient scope and query any table
-
ImpactExfiltrate cross-patient PHI and users_secure password hashes
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 | Requires the Patient Portal to be enabled (portal_onsite_two_enable=1), which the advisory notes is the standard configuration for any patient-facing OpenEMR deployment, and a valid enrolled portal account of the lowest role reaching OnsiteDocument.Query (route p_acl=p_all); the sibling OnsiteActivityView.Query is reachable by any staff user. The limiting factors are that an authenticated portal (or staff) session is mandatory - this is not anonymous/unauthenticated - and that deployments with the patient portal disabled are not reachable via this endpoint; no user interaction, non-default toggle, or specific platform beyond an affected version (<8.5.0) is otherwise needed. |
| Impact | This is a genuine priority, not a high-CVSS-but-low-real-risk issue. The supplied CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:L/UI:N) describes a remotely reachable, low-complexity attack requiring only the lowest authenticated privilege (PR:L), with high confidentiality impact on the vulnerable system (VC:H) and high subsequent-system confidentiality (SC:H) reflecting that stolen users_secure bcrypt hashes crack to application-admin access. The GHSA advisory documents live-verified exploitation on v8.1.0 and master, with error-, boolean-, and time-based oracles all firing and sqlmap confirming three injection techniques, so exploitability is practically demonstrated rather than theoretical. No CISA KEV listing and no EPSS score are present in the input, so there is no signal of active in-the-wild exploitation or a modeled exploitation probability to weigh; the risk case rests on the confirmed low-barrier mechanics and the vuln.today 'this_week' decision label rather than on observed attacks. Impact is bounded to confidentiality (VI/VA:N) - the flaw reads data but does not itself write or deny service - but the readable data includes all patients' PHI plus staff and admin credential hashes, which escalates the practical consequence well beyond the single endpoint. |
| Exploit ScenarioDerived | An attacker enrolls or uses any existing patient-portal account (the lowest role) and sends a single crafted request to the OnsiteDocument.Query document API with a malicious Id_BitwiseAnd parameter. Because the value lands unquoted in the SQL, they break out of the per-patient scope and read arbitrary tables - dumping other patients' demographics and the users_secure password hashes for later offline cracking to OpenEMR admin. The GHSA advisory includes a complete, live-verified reproduction with working error-based payloads, so the attack path is concrete; the low attack complexity (AC:L) means no special timing or grooming is needed. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 13, 2026
Authenticated SQL injection in OpenEMR's patient portal OnsiteDocument.Query endpoint, affecting releases before 8.5.0, lets any enrolled portal patient of the lowest role break out of the per-patient record scope and read arbitrary tables in the openemr schema - other patients' demographics, sessions, OAuth and API tokens, and the users_secure bcrypt password hashes for every staff and admin account. Impact is confidentiality-only, with no integrity or availability effect assessed; the only prerequisites are that the Patient Portal be enabled (portal_onsite_two_enable=1) and that the attacker hold a valid portal, or staff, session, with no user interaction required. The flaw is not listed in CISA KEV, but the vendor advisory publishes live-verified reproduction requests and notes sqlmap confirmed error-, boolean- and time-based oracles; the vendor fix is OpenEMR 8.5.0.
RemediationAI
Vendor-released patch: upgrade OpenEMR to 8.5.0 or later, which closes the vulnerable code path described in advisory GHSA-g2xw-rvhq-x543; no backport or interim patch version is documented in the available sources. Because the flaw requires an authenticated portal (or staff) session and reachability is explicitly gated on the Patient Portal being enabled, deployments that cannot upgrade immediately can reduce exposure by disabling the portal (portal_onsite_two_enable=0), at the cost of removing all patient-facing portal functionality for the duration; sites that must keep the portal online should treat every enrolled portal account, including the lowest-privilege role, as able to read the full openemr schema until 8.5.0 is applied. No other vendor-stated workaround, configuration flag or WAF rule is provided in the available evidence. Post-upgrade, review portal and staff access logs for requests to /portal/patient/api/onsitedocuments carrying *_BitwiseAnd parameters, and rotate staff and administrator credentials as well as OAuth and API tokens, since users_secure password hashes and token tables are readable through this primitive on unpatched hosts.
Affected VersionsENISA
Affected Packages
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
The root cause is CWE-89 arising from how OpenEMR's Phreeze-based portal controllers bind request parameters to ORM criteria objects. OnsiteDocumentController.php:144 copies every $_REQUEST key whose ucfirst() name matches a property on the auto-generated Criteria class, and that class declares a <Field>_BitwiseAnd property for every column, so an attacker-supplied Id_BitwiseAnd parameter is mass-assigned onto the criteria object. Criteria::GetWhere() (Phreeze/Criteria.php:275) then renders the fragment (column & value) with the attacker value in an unquoted numeric context, and the MySQLi driver's Escape() only handles backslash, NUL, newline, carriage return, 0x1a and quote characters, so spaces, parentheses and SQL keywords pass through intact. The sibling operators _Equals and _IsLike wrap their value in single quotes, where quote-only escaping is sufficient, which is why the _BitwiseAnd branch is the exploitable path. Critically, the injected predicate executes outside the per-patient Pid_Equals row scope, which is what makes a lowest-privilege portal account reach data belonging to other patients and to staff accounts. The route api/onsitedocuments carries p_acl => p_all, and the same vulnerable Criteria/MySQLi code is reachable by any staff user through OnsiteActivityView.Query. The code was confirmed live on release 8.1.0 (HEAD 28dc4f9) and found unchanged on master HEAD as of 2026-06-13.
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
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N
Network-reachable portal endpoint, trivial injection (AC:L) by a low-privilege authenticated patient (PR:L); reading other security authorities' data and admin hashes crosses scope (S:C), confidentiality-only (I/A:N).
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
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.
Technical POC Analysis
CWE-89 SQL injection arising from mass assignment into an ORM criteria object combined with a non-quoting escaper.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
OpenEMR, the electronic health record system used by your clinical operations, contains a high-severity SQL injection (CVE-2026-126488) that lets any authenticated patient portal user access the entire database, including other patients' records, session tokens, and staff password hashes. This exposes protected health information and could lead to credential compromise across the organization. Leadership should prioritize remediation because the flaw requires only a valid portal account and the portal is commonly enabled for patient access.
Apply vendor patch.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.
An authenticated SQL injection vulnerability exists in OpenEMR ≤ 4.1.1 Patch 14 that allows a low-privileged attacker to
Unauthenticated token disclosure in OpenEMR before 8.0.0. CVSS 10.0. PoC and patch available.
Path traversal in OpenEMR 7.0.4 disposeDocument() allows file access. PoC available.
Path traversal in OpenEMR electronic health records before fix allows authenticated users to read arbitrary files on the
SQL injection in OpenEMR electronic health records before fix. Authenticated users can execute arbitrary SQL through the
OpenEMR 7.0.2 is vulnerable to SQL Injection via \openemr\library\classes\Pharmacy.class.php, \controllers\C_Pharmacy.cl
An issue in OpenEMR 7.0.2 allows a remote attacker to escalate privileges viaa crafted POST request using the noteid par
Information disclosure in OpenEMR 5.0.2 to before 8.0.0 exposes sensitive data. PoC and patch available.
Remote code execution in OpenEMR through 8.2.0 lets an authenticated administrator poison the document category tree so
interface/fax/fax_dispatch.php in OpenEMR 4.1.0 allows remote authenticated users to execute arbitrary commands via shel
Authenticated low-privilege users can exploit OpenEMR before 8.3.0 to read and write arbitrary files through the fax/sms
interface/globals.php in OpenEMR 2.x, 3.x, and 4.x before 4.2.0 patch 2 allows remote attackers to bypass authentication
EUVD-2026-125136
GHSA-hf2c-h9g2-rf29
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB