/

CVE-2026-126472

Severity:

HIGH RISK

(8.8)

Authorization Bypass (CWE-639) in OpenEMR CCDA Gateway

CVE-2026-126472

Analyzed

Vulnerability type

Category:

Missing Authorization

CWE:

CWE-639

Impact:

Unauthorized access to patient health information

Severity:

HIGH RISK

(8.8)

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 has a missing authorization check in its CCDA gateway that can let an authenticated, low-privilege staff user access C-CDA documents belonging to other patients. By requesting document view or download actions for other patient IDs, an attacker may expose sensitive health information.

Affected context

The issue is in OpenEMR's ccdaservice/ccda_gateway.php and affects versions before 8.5.0. It becomes a risk when the gateway handles document view or download requests without verifying that the authenticated user is authorized to access the patient identified by the supplied patient ID.

Exploit preconditions

  • Attack surface: The CCDA gateway's document view and download actions
  • Required access: An authenticated, low-privilege staff account and its own CSRF token
  • Trigger point: A request to the gateway that references another patient's ID
  • Why exploitation is possible: The gateway does not adequately enforce patient-level authorization for the requested document; sequential patient IDs may make enumeration easier

Why this happens

The underlying issue is a missing object-level authorization check. The application uses a patient identifier supplied in a request to select a C-CDA document without consistently verifying that the authenticated user may access that patient's record. This maps to CWE-639: Authorization Bypass Through User-Controlled Key, where changing an object reference can expose another user's data.

Potential impact

  • An attacker may view or download other patients' C-CDA documents.
  • Exposed records could include medications, problems, allergies, and immunizations.
  • Unauthorized disclosure could compromise patient privacy and create regulatory or operational consequences.

General mitigation guidance

Common defensive patterns include:

  • Enforcing server-side authorization for every patient-specific view and download request.
  • Deriving accessible patient records from the authenticated user's permissions rather than trusting a request-supplied identifier.
  • Applying consistent record-level access checks across all document actions and alternate routes.
  • Limiting staff privileges to the records and operations required for their roles.
  • Logging and reviewing access to sensitive documents, including repeated requests across patient identifiers.

How teams detect issues like this

High-level detection approaches include:

  • Reviewing gateway and document-handling code for user-controlled identifiers used without record-level authorization checks.
  • Using static analysis or code review rules to flag sensitive object lookups followed by document access without an authorization decision.
  • Testing access-control policies to confirm users cannot view or download records outside their permitted scope.
  • Monitoring for repeated document requests across many patient IDs or unusual access patterns.

Sources

SourceLink
github.comgithub.com/openemr/openemr/security/advisories/GHSA-6fxw-69cq-m7g6
vulncheck.comvulncheck.com/advisories/openemr-before-8.5.0-missing-authorization-in-ccdaservice-ccda-gateway-php-c-cda-disclosure

Frequently asked

questions

The described attack requires an authenticated, low-privilege staff account. The account's own CSRF token does not establish authorization to access another patient's document.

C-CDA documents may contain medications, problems, allergies, and immunizations.

Check authorization on the server for each requested patient record and document action, using the authenticated user's access rights rather than trusting a supplied patient ID.

Apply and test record-level authorization consistently across sensitive endpoints, and monitor for unusual access patterns such as repeated requests involving many patient identifiers.

Find out what's already
exploitable in your codebase.