/

CVE-2026-126473

Severity:

CRITICAL RISK

(9.1)

Authorization Bypass (CWE-863) in OpenEMR FHIR OAuth

CVE-2026-126473

Awaiting Analysis

Vulnerability type

Category:

Authorization Bypass

CWE:

CWE-863

Impact:

Unauthorized access to and modification of FHIR Patient records

Severity:

CRITICAL RISK

(9.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 has OAuth scope canonicalization and containment flaws that can let unauthenticated attackers obtain unapproved system-level access to FHIR Patient resources. If the OAuth registration and authorization flow is exposed, an attacker may bypass approval and request permissions to read, modify, or create Patient records.

Affected context

The issue affects OpenEMR deployments before 8.4.0 where OAuth scope handling does not consistently canonicalize and constrain system-level FHIR scopes. A client may register a colon-form scope such as system:Patient.read and then request an unregistered slash-form scope such as system/Patient.write, potentially bypassing approval checks.

Exploit preconditions

  • Attack surface: OpenEMR's OAuth client registration and FHIR authorization flows
  • Required access: The described attack is unauthenticated; it does not require an existing user account
  • Trigger point: Scope registration and subsequent scope evaluation during an OAuth request
  • Why exploitation is possible: Inconsistent scope canonicalization and containment checks may allow an unapproved system-level scope to pass authorization

Why this happens

The underlying flaw is improper authorization (CWE-863). Scope values are not consistently normalized and checked against the scopes approved for a client, allowing differently formatted values to evade containment or approval logic. Authorization decisions should be based on a canonical representation and an exact, policy-bound set of permitted scopes.

Potential impact

  • Attackers may read Patient records without approval
  • Attackers could modify existing Patient records
  • Attackers may create Patient records
  • Unauthorized access could affect the confidentiality and integrity of healthcare data

General mitigation guidance

Defensive patterns include canonicalizing scope values before both registration and authorization, then comparing requests against an explicit allowlist of scopes approved for each client. Reject ambiguous or unsupported scope formats, and default to denying access when validation or containment checks fail. Limit client registration and FHIR permissions to the minimum necessary, and apply access controls and monitoring around OAuth registration and token issuance.

How teams detect issues like this

Review OAuth scope parsing and authorization code for inconsistent normalization, substring-based containment checks, or approval decisions made against non-canonical values. Test that unapproved scope variants are rejected and that requested scopes cannot exceed a client's approved permissions. Enforce policies requiring explicit scope allowlists and fail-closed authorization; automated static analysis and security testing can help identify risky patterns.

Sources

SourceLink
github.comgithub.com/openemr/openemr/security/advisories/GHSA-6xh3-fmm5-jjp4
vulncheck.comvulncheck.com/advisories/openemr-before-8.4.0-oauth-authorization-bypass-via-scope-canonicalization

Frequently asked

questions

The described attack uses OpenEMR's OAuth and FHIR flows and does not require an authenticated account. Exposure depends on whether those flows are reachable in a deployment.

The vulnerability is described as unauthenticated. The relevant condition is access to the affected OAuth client registration and authorization flow.

Canonicalize scopes consistently, authorize only explicitly approved scopes, and deny requests that are ambiguous or exceed a client's permissions.

Use exact, policy-based scope checks and test authorization boundaries across alternate scope representations. Apply least privilege and fail-closed behavior throughout the OAuth flow.

Find out what's already
exploitable in your codebase.