/

CVE-2026-124461

Severity:

HIGH RISK

(8.1)

Missing Authorization (CWE-862) in OpenEMR Upload Handler

CVE-2026-124461

Analyzed

Vulnerability type

Category:

Missing Authorization

CWE:

CWE-862, CWE-639

Impact:

Unauthorized disclosure and modification of patient 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's upload handler does not adequately check whether an authenticated user is authorized to access or change the document identified by a supplied doc_id. A low-privilege user may be able to enumerate document IDs to read patient information or overwrite medical records belonging to other patients.

Affected context

The issue occurs in library/ajax/upload.php when the fetch and save actions handle document IDs without sufficient authorization checks. Deployments may be at risk when authenticated users can reach these actions and the handler does not verify that each document belongs to a patient or record the user is permitted to access. The description identifies OpenEMR versions before 8.3.0 as affected.

Exploit preconditions

  • Attack surface: The OpenEMR upload handler's fetch and save actions
  • Required access: An authenticated account; the account may have low privileges
  • Trigger point: A request that supplies a document ID to fetch or save
  • Why exploitation is possible: The handler does not adequately authorize access to the requested document, allowing users to try arbitrary or enumerated IDs

Why this happens

The underlying issue is a failure to enforce authorization on a document-level operation. The handler accepts a supplied doc_id without reliably verifying that the authenticated user may read or modify the associated document. This is an instance of CWE-862: Missing Authorization: access is permitted without the required authorization check.

Potential impact

  • Patient health information may be disclosed to unauthorized users.
  • Medical records or document data may be overwritten or tampered with.
  • Unauthorized changes could affect clinical workflows or record integrity.
  • Exposure or alteration could extend across multiple patients if document IDs are accessible.

General mitigation guidance

Common defensive patterns include:

  • Enforcing authorization checks on every document read and write, including AJAX actions.
  • Deriving the permitted patient and document scope from the authenticated user's server-side identity and role, rather than trusting a client-supplied ID.
  • Applying consistent ownership and access-policy checks before fetching or saving document data.
  • Following least-privilege principles for user roles and limiting access to sensitive records by default.
  • Logging and reviewing denied access attempts and unusual document access patterns.

How teams detect issues like this

Review document-handling endpoints for authorization checks that occur before data is fetched or changed. Static analysis and code review can flag handlers that use client-supplied identifiers in database or file operations without a corresponding access-policy check. Test access policies with accounts of different roles and patient scopes, and enforce server-side authorization requirements through API policies and security tests.

Sources

SourceLink
github.comgithub.com/openemr/openemr/security/advisories/GHSA-7h7v-29jv-527v
vulncheck.comvulncheck.com/advisories/openemr-before-8.3.0-idor-via-dicom-library-ajax-upload-php-endpoint

Frequently asked

questions

The described issue requires authentication, but an account with low privileges may be sufficient if the upload actions are reachable and document-level authorization is missing.

The fetch action may expose patient document data, while the save action may allow unauthorized changes to documents or medical records.

Verify authorization for the specific document and patient on the server for every read and write, before performing the operation.

Treat client-supplied IDs as untrusted, enforce least privilege and object-level access policies, and test authorization boundaries across roles and patient records.

Find out what's already
exploitable in your codebase.