/

CVE-2026-124459

Severity:

HIGH RISK

(8.1)

Insecure Direct Object Reference (CWE-639) in OpenEMR

CVE-2026-124459

Analyzed

Vulnerability type

Category:

Insecure Direct Object Reference (IDOR)

CWE:

CWE-639

Impact:

Unauthorized access to and modification of clinical records

Severity:

HIGH RISK

(8.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

OpenEMR encounter-form endpoints may allow authenticated clinical users to access or modify records belonging to other patients when patient and encounter ownership checks are missing. If form identifiers can be guessed or enumerated, an attacker may read or overwrite clinical records by changing an identifier in a request.

Affected context

The issue affects OpenEMR encounter-form view and save endpoints in versions before 8.3.0. The described endpoints include soap/view.php and save.php; risk arises where a request's form identifier is accepted without verifying that the authenticated user is authorized to access the associated patient and encounter.

Exploit preconditions

  • Attack surface: Encounter-form view and save endpoints
  • Required access: An authenticated clinical user account
  • Trigger point: A request that supplies an encounter-form identifier
  • Why exploitation is possible: Identifiers may be sequential, and affected endpoints lack checks tying the requested form to a patient and encounter the user is permitted to access

Why this happens

The underlying issue is an authorization failure involving a user-controlled object identifier. When an endpoint retrieves or updates a form by its identifier without checking the user's access to the associated patient and encounter, changing that identifier may expose or alter another patient's record. This maps to CWE-639: Authorization Bypass Through User-Controlled Key.

Potential impact

  • An authenticated user could read clinical records belonging to other patients
  • An authenticated user could overwrite or otherwise modify another patient's clinical records
  • Unauthorized changes could affect the accuracy and integrity of clinical information

General mitigation guidance

Common defensive patterns include:

  • Enforce server-side authorization checks for every record-level read and write, verifying access to the associated patient and encounter
  • Derive permitted records from the authenticated user's authorized scope rather than trusting client-supplied identifiers
  • Apply the same authorization policy consistently across view, save, and related endpoints
  • Use least-privilege roles and limit access to patient records to what users need for their work
  • Treat identifiers as references, not proof of authorization; unpredictable identifiers alone are not a substitute for access checks

How teams detect issues like this

  • Use static analysis and code review to find endpoints that fetch or update records using request-supplied identifiers without object-level authorization checks
  • Review encounter-form routes for consistent patient and encounter ownership validation on both reads and writes
  • Test authorization policies to confirm that users cannot access records outside their permitted scope by changing identifiers
  • Monitor for unusual patterns of sequential identifier access or cross-patient record updates
  • Use automated security review tools as a complement to manual authorization testing

Sources

SourceLink
github.comgithub.com/openemr/openemr/security/advisories/GHSA-3mg9-27fw-m9j6
vulncheck.comvulncheck.com/advisories/openemr-before-8.3.0-cross-patient-idor-via-encounter-form-viewers-and-save-handlers

Frequently asked

questions

The described attack requires an authenticated clinical user account. The account's permissions and deployment controls may affect which records are reachable.

An attacker needs access to the affected endpoints and must be able to submit requests containing encounter-form identifiers. Sequential identifiers may make other form identifiers easier to guess or enumerate.

Check authorization on the server for every requested record, including verifying access to its patient and encounter before reading or changing it.

Apply consistent object-level authorization across all endpoints, avoid treating client-supplied identifiers as authorization, and test access boundaries with users who have different scopes.

Find out what's already
exploitable in your codebase.