/

CVE-2026-124483

Severity:

HIGH RISK

(8.3)

Incorrect Authorization (CWE-863) in OpenEMR Rx API

CVE-2026-124483

Analyzed

Vulnerability type

Category:

Incorrect Authorization

CWE:

CWE-863

Impact:

Unauthorized prescription access and modification

Severity:

HIGH RISK

(8.3)

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 prescription REST API routes use the medical-records access control instead of the prescription-specific permission, allowing staff with read-only Medical/History access to pass authorization checks. An authenticated user with access to the exposed API token may be able to enumerate prescription identifiers, create prescriptions for patients, or deactivate existing prescriptions.

Affected context

The issue occurs in OpenEMR prescription REST API routes when authorization checks rely on the patients.med ACL rather than the prescription-specific patients.rx ACL and do not require a specific permission bit. In affected configurations, authenticated staff whose access is limited to read-only Medical/History information may pass these checks. The described behavior applies to OpenEMR versions before 8.4.0.

Exploit preconditions

  • Attack surface: Prescription REST API routes
  • Required access: An authenticated staff account whose patients.med access passes the route check; the prescription-specific permission is not enforced
  • Trigger point: Requests to API operations that enumerate, create, or deactivate prescriptions
  • Additional condition: The attacker can obtain and reuse the UI-exposed APICSRFTOKEN
  • Why exploitation is possible: The routes check the wrong ACL and do not require a specific permission bit, so read-only Medical/History access can be treated as sufficient authorization

Why this happens

The API applies an authorization check for medical-record access where prescription-specific authorization is required. Because the check does not enforce the relevant permission bit or validate the user's prescription privileges for the requested action and patient, users with insufficient rights may pass it. This is an authorization enforcement failure mapped to CWE-863: Incorrect Authorization.

Potential impact

  • Authenticated staff users may be able to enumerate prescription UUIDs.
  • Unauthorized users could create or forge prescriptions for arbitrary patients.
  • Existing prescriptions could be deactivated across the tenant.
  • Prescription integrity and patient care workflows may be affected.

General mitigation guidance

Defensive patterns include:

  • Apply the prescription-specific ACL and required permission bit to each prescription API operation.
  • Enforce authorization on the server for every action and target patient; do not rely on UI visibility or client-provided tokens as a substitute for permission checks.
  • Default to denying access when permissions are absent, ambiguous, or cannot be verified.
  • Scope access to the user's permitted patients and tenant, and separate read, create, and deactivate privileges.
  • Keep CSRF protections in place while treating them as complementary to authorization, not as authorization itself.

How teams detect issues like this

Review API routes for mismatches between the resource being accessed and the ACL being checked, and verify that each operation enforces the required permission bit. Test authorization policies across staff roles, actions, and patient or tenant boundaries, including read-only accounts attempting write operations. Audit logs for prescription enumeration, creation, and deactivation can help identify unusual activity. Static analysis and automated policy checks may help flag missing or inconsistent server-side authorization.

Sources

SourceLink
github.comgithub.com/openemr/openemr/security/advisories/GHSA-qrc2-5wvq-f68q
vulncheck.comvulncheck.com/advisories/openemr-before-8.4.0-improper-authorization-via-prescription-rest-api

Frequently asked

questions

The described scenario involves authenticated staff users whose read-only Medical/History access passes the incorrect ACL check, provided they can use the API token exposed through the UI.

They may be able to enumerate prescription UUIDs, create prescriptions for arbitrary patients, or deactivate existing prescriptions tenant-wide.

Enforce prescription-specific permissions on the server for every operation, and verify authorization for the requested patient and tenant.

Use deny-by-default authorization policies, test permissions across roles and actions, and review routes for ACL-to-resource mismatches.

Find out what's already
exploitable in your codebase.