Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate as patient portal user
-
DeliverySend crafted Id_BitwiseAnd request to onsitedocuments API
-
ExploitSQL injected into unquoted WHERE clause
-
ExecutionError-based payload exfiltrates arbitrary tables
-
ImpactRead patient records and staff 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 an authenticated patient portal account (PR:L) and that the OnsiteDocument query route is reachable - GET api/onsitedocuments carries p_acl 'p_all' and p_reg false, so any logged-in patient session suffices and the patient portal must be enabled (a common OpenEMR deployment choice). Beyond that, NO special non-default configuration is needed: the Id_BitwiseAnd parameter (and roughly eighteen sibling *_BitwiseAnd/_BitwiseOr column properties) are injectable on default installs because the bitwise SQL builder places the value unquoted and the str_replace-based Escape() only neutralizes quote/backslash characters, which are irrelevant in an unquoted numeric context. Extraction is error-based rather than blind because AppBasePortalController::RenderErrorJSON serializes the DB exception message and stack trace into the 401 response. The main LIMITING factor is the authentication requirement (a valid patient account); the further escalation to code execution is strictly conditional, requiring the MySQL account to hold the global FILE privilege and to share a host with the web server for SELECT ... INTO OUTFILE. |
| Impact | Severity is solidly high but short of critical: the CVSS 4.0 base is 7.1 (AV:N/AC:L/AT:N/PR:L/UI:N) with high confidentiality impact (VC:H) and only limited integrity (VI:L), no availability impact. The network vector, low complexity, and lack of user interaction make this easy to trigger, but PR:L means it is NOT unauthenticated - an attacker must first hold a valid patient portal account, which tempers mass, opportunistic exploitation. No CISA KEV entry is present in the input (so: no public exploit identified as actively exploited - exploitation status is 'no public exploit identified at time of analysis' for in-the-wild activity), and no EPSS score was provided, so the probabilistic-exploitation signal is simply MISSING and cannot be weighed. Countering that absence, the GHSA advisory publishes a complete, copy-pasteable error-based injection URL (extractvalue/concat against users_secure), so barrier-to-exploit is very low for anyone who can register as a patient. The vuln.today decision label is 'this_week' (not act_now/emergency), which aligns with: real priority given a working PoC and healthcare-data exposure, but bounded by the authentication prerequisite rather than an unauthenticated internet-facing RCE. Net: a genuine priority to patch this week for any OpenEMR install exposing the patient portal, not a drop-everything emergency on the available signals. |
| Exploit ScenarioDerived | An attacker who holds (or self-registers) a low-privileged patient portal account sends a single crafted GET request to the OnsiteDocument query API, setting the Id_BitwiseAnd parameter so that attacker-controlled SQL lands unquoted in the WHERE clause. Because database exceptions are serialized back into the 401 response, the attacker uses error-based payloads (e.g. extractvalue+subquery) to dump arbitrary tables, including users_secure staff password hashes and every patient's clinical records. The advisory includes a working PoC URL, and the network/low-complexity vector means the request succeeds against a default patient-portal-enabled install in one authenticated session. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 08, 2026
Authenticated patient portal users in OpenEMR before 8.4.0 can inject arbitrary SQL into the OnsiteDocument query API by supplying parameters such as Id_BitwiseAnd, because the controller copies any request key matching a criteria property onto the query object and the bitwise comparator builds an unquoted WHERE fragment. A single low-privileged patient account is enough to read any table in the database, including other patients' records and the password hashes in users_secure, and the injection is error-based since database exception messages and stack traces are returned in 401 responses. A public proof-of-concept reference is published in the GitHub security advisory; it is not independently verified here as working exploit code, and no CISA KEV entry or active exploitation is recorded.
RemediationAI
Upgrade to OpenEMR 8.4.0, the vendor-released fix (patch available per vendor; see https://github.com/openemr/openemr/security/advisories/GHSA-hx8r-g8gw-6g2j), on every instance with the patient portal in use. Where an immediate upgrade is not possible, the exposure is bounded by the authentication prerequisite, so review and prune dormant patient portal accounts and restrict who can self-register or be issued portal credentials - the trade-off is reduced patient self-service. If the portal is not operationally required, disabling it removes the GET api/onsitedocuments route entirely, at the cost of losing portal functionality. Because extraction is error-based and depends on database error text reaching the client, suppressing detailed SQL errors in the portal's JSON error handler reduces data leakage but does not remove the injection. Separately, ensure the OpenEMR database account does not hold the global FILE privilege and does not run on the same host as the web server, which blocks the conditional SELECT ... INTO OUTFILE escalation to code execution; this is a hardening measure and not a substitute for patching.
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
OpenEMR's patient portal uses the vendored Phreeze ORM. OnsiteDocumentController::Query() first sets a scoping filter (Pid_Equals) and then loops over array_keys($_REQUEST), assigning every parameter whose name matches a declared property on OnsiteDocumentCriteria - a mass assignment weakness (CWE-915) that lets the request choose which filter is applied. The criteria class is generated (OnsiteDocumentCriteriaDAO) and declares Id_In, Id_IsEmpty, Id_BitwiseOr, Id_BitwiseAnd and similar properties for roughly nineteen columns, none of which appear in the controller source. Criteria.php dispatches on the property-name suffix; nearly every branch quotes the value or routes it through GetQuotedSql, but the _BitwiseAnd/_BitwiseOr branches concatenate it directly into "(<field> & <value>)". The Escape() routine in the MySQLi driver is a str_replace over backslash, NUL, CR, LF, 0x1a and both quote characters - adequate inside a quoted literal, irrelevant in an unquoted numeric context where spaces, parentheses, operators and keywords reach the parser unchanged. The PortalSessionPidGuard added after an earlier Pid_Equals reassignment only matches names beginning with pid/patientid, so Id_BitwiseAnd bypasses it entirely. Because AppBasePortalController::RenderErrorJSON serializes the exception message and stack trace into a 401 JSON response, extraction is error-based (e.g. extractvalue/updatexml) rather than blind; the route is registered as GET api/onsitedocuments with p_acl 'p_all' and p_reg false, so any logged-in patient session reaches it.
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:L/VA:N/SC:N/SI:N/SA:N
Authenticated patient account gives PR:L; remote, error-based and reliable so AV:N/AC:L/UI:N; full database read is C:H with only limited integrity and no availability impact.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
OpenEMR before 8.4.0 contains a mass assignment vulnerability in the patient portal OnsiteDocument query API that lets request parameters set bitwise criteria filters whose values are placed unquoted into the SQL WHERE clause. Authenticated patient portal users can inject SQL via parameters such as Id_BitwiseAnd to read any database table, including other patients' records and staff password hashes.
Technical POC Analysis
CWE-89 SQL injection, enabled by CWE-915 mass assignment.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
OpenEMR versions before 8.4.0 contain a high-severity SQL injection flaw (CVE-2026-124444) that allows any authenticated patient portal user to read the entire database, including other patients' medical records and password hashes. This could lead to a large-scale data breach, regulatory penalties under HIPAA, and severe reputational damage. Leadership should prioritize immediate remediation because the vulnerability is easy to exploit with a low-privileged account and a public PoC reference exists.
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-119556
GHSA-h4mx-8cw8-cfv2
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB