Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate as low-privilege portal patient
-
DeliveryHarvest portal-payment subject CSRF token
-
ExploitPOST paylib.php with forged form_pid of victim
-
ExecutionWrite/modify payment-audit row under victim's pid
-
ImpactCorrupt billing reconciliation and payment-fraud triage
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V8 - Authorization Object-level authorization, IDOR prevention
|
| Exploitation Conditions | Requires a valid authenticated portal-patient account on an OpenEMR instance (before 8.3.0) with the patient payment portal in use, plus a CSRF token harvested from the portal-payment subject (tokens from other portal pages return HTTP 403). No further privilege is needed: any ordinary portal patient can set the body field form_pid to any other patient's sequential integer pid and write to onsite_portal_activity. The mode=Sphere branch additionally requires the deployment to use the Sphere payment gateway (it reads patient_id_cc from the decrypted Sphere blob); the AuthorizeNet, Stripe, portal-save and review-save branches apply more generally. Limiting factors: exploitation is authenticated (not anonymous), impact is restricted to integrity of payment-audit records (no confidentiality disclosure, no availability impact, no code execution), and the portal must be enabled and reachable. The vendor states updating to 8.3.0 is the fix (replacing body-supplied form_pid with the session-bound pid). |
| Impact | Signals are broadly consistent and point to a real but bounded priority. The input CVSS 4.0 base score is 7.1 (HIGH) with vector AV:N/AC:L/AT:N/PR:L/UI:N and integrity-only impact (VI:H, VC/VA N); the vendor's own GHSA advisory scores it 6.5 under CVSS 3.1 (AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N). Both agree on the mechanism: a network-reachable, low-complexity flaw requiring only a low-privilege authenticated portal-patient account, with impact confined to integrity of payment-audit records - no confidentiality loss, no availability loss, no code execution. No CISA KEV listing and no EPSS score are provided, so there is no evidence of active or widespread exploitation; however a detailed public PoC reference (an exploit.sh reproduction archive) is attached to the advisory and the vendor documents a live reproduction dated 2026-05-04, so the barrier to exploitation is low. The vuln.today decision label is 'this_week' (not act_now/emergency), which matches the picture: this is not a remote-unauthenticated RCE, but because patient pids are sequential integers the attack is trivially automatable across an entire patient population, inflating the practical integrity/fraud risk above what an integrity-only, single-record flaw would normally imply. Net: a genuine fix-this-week issue for OpenEMR operators with the patient portal enabled, not a high-CVSS-but-low-real-risk item, though its ceiling is billing-record/audit integrity rather than data theft or takeover. |
| Exploit ScenarioDerived | An attacker registers or already holds a low-privilege portal-patient account, authenticates to the OpenEMR patient portal, and harvests a valid portal-payment CSRF token. They then POST to portal/lib/paylib.php (e.g. mode=portal-save) with form_pid set to a victim's patient id, inserting an attacker-controlled forged payment-audit row - cardholder name, masked card number, invoice JSON and narrative - into another patient's billing record; the review-save branch additionally lets them flip a victim's in-flight payment status. A public PoC reference (exploit.sh reproduction archive) exists and the vendor documents a live reproduction, and because pids are sequential the request can be looped across the whole patient population in seconds. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 08, 2026
Cross-patient payment-audit forgery in OpenEMR's patient portal (versions before 8.3.0) allows any authenticated portal patient to write or modify billing-audit rows belonging to a different patient by supplying that patient's numeric pid in the form_pid body field. The portal derives the correct session patient id but never compares it against the body value before calling SaveAudit()/CloseAudit(), so forged 'payment received' records with attacker-controlled cardholder name, masked card number, gateway response, narrative and invoice JSON land in onsite_portal_activity under the victim's record; the review-save branch can additionally alter a victim's most recent in-flight payment row. Impact is integrity-only (no confidentiality or availability effect, no code execution) and requires a valid portal account plus a CSRF token harvested from the portal-payment subject; OpenEMR 8.3.0 is the vendor-released fix. A public PoC reference exists in the vendor advisory (including an attached reproduction archive); it is not verified by us as working exploit code, and there is no indication of confirmed active exploitation (not in CISA KEV).
RemediationAI
Upgrade to OpenEMR 8.3.0, which the vendor states is the fix; patch availability is confirmed as vendor-released (fixed in 8.3.0, packaged as /OpenEMR vulnerable <8.3.0, fixed in 8.3.0) and the advisory at https://github.com/openemr/openemr/security/advisories/GHSA-c9wg-vrr9-65wj documents the behavior change. For sites that maintain a local fork, the advisory specifies the exact code fix: replace every body-derived assignment ($form_pid = $_POST['form_pid'] at the AuthorizeNet, Stripe, portal-save and review-save branches, and $form_pid = $dataTrans['get']['patient_id_cc'] in the Sphere branch) with $form_pid = $pid, the session-bound value already derived in portal/lib/paylib.php, since a patient paying their own bill has no legitimate reason to supply a pid; additionally re-derive the session pid inside SaveAudit() and CloseAudit() and deny on mismatch as defense in depth, and ignore patient_id_cc for write purposes after decrypting the Sphere blob. The advisory notes the same fix shape applies to portal/messaging/handle_note.php and portal/lib/persist.php, and suggests a static-analysis rule forbidding new portal endpoints from reading pid-shaped values from $_POST, $_REQUEST or php://input. No alternative workaround is documented by the vendor; the sources present updating as the complete fix, and any interim restriction of the portal payment flow should be weighed against the loss of online patient payment capability.
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 is a PHP-based electronic health record and practice-management platform whose patient-facing portal includes a payment component at portal/lib/paylib.php. The file correctly binds the payer to the session at line 31 ($pid = $session->get('pid')), and it correctly enforces a CSRF token check at line 55 - the flaw is not a missing token but a missing object-level authorization check. Five request branches - mode=Sphere (reading patient_id_cc out of the decrypted Sphere payload), mode=AuthorizeNet, mode=Stripe, mode=portal-save and mode=review-save - reassign a local $form_pid from request input and pass it straight into SaveAudit() and CloseAudit(), which persist it into onsite_portal_activity.patient_id. This is CWE-639 (Authorization Bypass Through User-Controlled Key), the classic insecure direct object reference / OWASP API1 Broken Object Level Authorization pattern: a client-supplied identifier is trusted as the authorization scope. Because patient pids are sequential integers, an attacker can enumerate the whole patient population and mass-insert rows, and the write path accepts attacker-chosen invoice JSON, narrative and gateway metadata, making the forged records look like legitimate reconciliation data. CVSS 4.0 scores the issue 7.1 (AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:N); the advisory's CVSS 3.1 equivalent is 6.5, matching the independently assessed vector AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N. The single-pid nature of each request and the requirement for an authenticated portal session with a subject-correct token keep this a bounded, authenticated integrity issue rather than a pre-auth takeover.
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:N/VI:H/VA:N/SC:N/SI:N/SA:N
Network-reachable (AV:N), low complexity (AC:L), low-privilege authenticated portal patient (PR:L), no interaction (UI:N); integrity-only write to payment-audit data (I:H) with no confidentiality or availability impact.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
OpenEMR before 8.3.0 contains an insecure direct object reference in portal/lib/paylib.php, which writes the request-supplied form_pid (or the patient_id_cc value in Sphere data) to onsite_portal_activity without checking it against the session patient. Authenticated portal patients can submit portal-save, review-save, AuthorizeNet, Stripe, or Sphere requests to insert or modify forged payment-audit records in other patients' billing records.
Technical POC Analysis
CWE-639 (Authorization Bypass Through User-Controlled Key) / OWASP API1 BOLA, in the OpenEMR patient-portal payment handler portal/lib/paylib.php.
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 prior to 8.3.0 contain a high-severity integrity flaw that allows any authenticated patient portal user to forge payment-audit records for other patients. This could lead to fraudulent billing entries, erode trust in financial data, and potentially enable insurance fraud. Leadership should prioritize remediation because the vulnerability is easy to exploit with a valid account and directly undermines the integrity of patient billing records.
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
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-119531
GHSA-m965-q963-p5wc
NVD
CVE.org
EPSS
Exploit-DB