Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate as any staff user
-
DeliverySend GET to api/onsiteactivityviews with Id_BitwiseAnd payload
-
ExploitBreak out of bitwise parenthesis via injected SQL
-
ExecutionAppend OR tautology or UNION SELECT
-
ImpactRead PHI, hashes, and API tokens
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 (1) a valid authenticated OpenEMR staff account of ANY privilege level - a lowest-privilege receptionist in the Default group is confirmed sufficient because the session carries no pid and the route's p_acl=p_none check is only enforced for patient (bootstrap_pid) sessions; (2) the patient portal enabled, which is the default configuration; and (3) network access to the portal HTTP endpoint (/portal/patient/index.php). No CSRF token, special header, file upload, or user interaction is needed. Limiting factors: valid staff credentials are mandatory (unauthenticated requests return HTTP 400), and the injection is read-only - stacked queries, data modification, INTO OUTFILE/file write, arbitrary file read (blocked by secure_file_priv), and RCE are all confirmed not possible. |
| Impact | This is a genuine near-term priority rather than a paper-high CVE, but not an emergency. The provided CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:L/VA:N, score 7.1) is internally consistent with the advisory: network-reachable over the portal HTTP endpoint, low complexity (a single GET parameter), and low privilege (any authenticated staff account, including a lowest-privilege Default-group receptionist, confirmed in the PoC). The vuln.today Decision label is this_week, aligning with a serious-but-not-drop-everything posture. No EPSS score and no CISA KEV entry are provided, so there is no signal of mass or active exploitation; the exploitation status is that a detailed public PoC/reproduction exists in the GHSA advisory (captured SQL and extracted-row output), but the input does not mark it as packaged, verified-working exploit code. The main caveat is the privilege boundary: exploitation requires a valid staff login, so this is an insider or post-credential-compromise escalation-of-access issue, not a pre-auth internet-wide bug - that materially lowers real-world mass-exploitation likelihood while keeping impact high (full PHI, bcrypt hashes, MySQL auth strings, and API tokens readable). CVSS I:L/VI:L reflects only indirect integrity (offline-crackable hashes), and A:N is correct since the injection is read-only. |
| Exploit ScenarioDerived | A low-privilege staff user (e.g. a receptionist) authenticated to OpenEMR sends a crafted GET request to the patient portal endpoint api/onsiteactivityviews with Id_BitwiseAnd=1) OR 1=1 , closing the bitwise parenthesis and making the WHERE clause tautological to dump all patient records regardless of ACL. Switching to a UNION SELECT payload matching the reporter's 38-column query, the attacker reads arbitrary tables to exfiltrate staff bcrypt hashes, MySQL authentication strings, insurance data, and 145 API tokens. A working PoC with captured SQL and extraction output is published in the GHSA advisory. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 13, 2026
SQL injection in OpenEMR's patient portal api/onsiteactivityviews endpoint affects every release before 8.5.0 and lets any authenticated staff account - a lowest-privilege receptionist in the Default group is confirmed sufficient - read arbitrary database tables through an Id_BitwiseAnd request parameter. The route's p_acl = p_none guard is only enforced for patient (bootstrap_pid) sessions, so a staff session carrying no pid bypasses it entirely, and a payload such as 1) OR 1=1# or a 38-column UNION SELECT exposes all patient PHI, staff bcrypt password hashes, MySQL authentication strings, insurance data and API tokens. The injection is strictly read-only (stacked queries, INTO OUTFILE, arbitrary file read and RCE are confirmed impossible), a public proof-of-concept with reproduction output is published in the GitHub security advisory, no confirmed active exploitation is reported in the available intelligence, and the current priority decision is 'this_week' - a near-term fix rather than an emergency.
RemediationAI
Upgrade to OpenEMR 8.5.0, the vendor-released fix, following the GitHub security advisory at https://github.com/openemr/openemr/security/advisories/GHSA-vvj8-xpx8-p293; the advisory's suggested code change is to replace $this->Escape($val) with $this->GetQuotedSql($val) in the _BitwiseAnd branch of portal/patient/fwk/libs/verysimple/Phreeze/Criteria.php::Prepare(), matching the quoting already used by the _Equals branch, which defenders maintaining a fork can backport. Where an immediate upgrade is not possible, the highest-value compensating control is to disable the patient portal, which removes the /portal/patient/index.php endpoint entirely at the cost of patient self-service scheduling, messaging and record access; a narrower alternative is to restrict network access to the portal path to trusted networks, accepting that any staff account reaching it can still exploit the injection. Because exploitation requires only a valid low-privilege staff login, review OpenEMR staff accounts for stale or over-provisioned users and audit portal request logs for Id_BitwiseAnd parameters containing ), OR, UNION, # or --. Note that the injection is read-only - there is no write primitive, file write or RCE - but the extracted bcrypt hashes are offline-crackable, so rotate staff credentials and API tokens if compromise is suspected.
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 flaw is CWE-89 (improper neutralization of special elements in an SQL command) in the Phreeze ORM that underpins the OpenEMR patient portal. OnsiteActivityViewController::Query() iterates over every $_REQUEST key and assigns any name matching a property on OnsiteActivityViewCriteria directly onto that object, with no whitelist, so an attacker controls Id_BitwiseAnd. Criteria::Prepare() quotes values for most criteria branches but the _BitwiseAnd branch concatenates the value unquoted - " (" . $dbfield . " & " . $this->Escape($val) . ")" - and Escape() in the MySQLi data driver replaces only seven character classes (backslash, NUL, LF, CR, \x1a, single quote, double quote), leaving ), space, OR, =, # and -- intact. OnsiteActivityViewReporter::GetCustomQuery() splices the resulting WHERE clause into a multi-table LEFT JOIN over onsite_portal_activity, patient_data and users, and QueryBuilder::GetWhereSQL() wraps it in an outer parenthesis pair, so 1) OR 1=1# closes the bitwise group, forces the predicate tautological and comments out the trailing parenthesis; a matching-column UNION SELECT then reads arbitrary tables. A second weakness compounds the first: GenericRouter::GetRoute() enforces p_acl = p_none only when bootstrap_pid is set (patient sessions only), and Query() sets no Pid_Equals isolation condition, meaning even a benign request returns every patient's rows rather than the caller's own.
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
Network portal endpoint and single-parameter trigger give AV:N/AC:L; any staff login is required so PR:L; full read of PHI/hashes/tokens is C:H, offline-crackable hashes yield indirect I:L, read-only so 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 api/onsiteactivityviews endpoint that allows any authenticated staff user to inject SQL through unquoted Id_BitwiseAnd Criteria values. Attackers can close the bitwise parenthesis and append OR or UNION SELECT clauses to read patient PHI, staff password hashes, MySQL authentication strings, and API tokens.
Technical POC Analysis
CWE-89.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
A high-severity SQL injection vulnerability in OpenEMR (all releases before 8.5.0) exposes the entire patient database-including PHI, hashed credentials, and API tokens-to any authenticated staff member, even a lowest-privilege receptionist. Because the flaw bypasses access controls intended for patient sessions, a single compromised or malicious staff account could exfiltrate sensitive data, potentially triggering HIPAA breach notification obligations and reputational damage. Leadership should prioritize remediation this week due to the broad access and confirmed public proof-of-concept.
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-124959
GHSA-qhcc-hvxh-cfgh
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB