/

CVE-2026-126442

Severity:

HIGH RISK

(8.1)

Missing Authorization (CWE-862) in OpenEMR Portal Login

CVE-2026-126442

Analyzed

Vulnerability type

Category:

Missing Authorization

CWE:

CWE-862

Impact:

Patient portal account takeover, potential exposure of protected health information, and denial of access to the patient

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 portal-login credential update flow may allow a low-privilege authenticated user to replace a patient's portal credentials without the required authorization checks. If the user can select a victim patient in the session and submit replacement credentials, they could take over that portal account, access protected health information, or prevent the patient from signing in.

Affected context

The issue is in create_portallogin.php in OpenEMR versions before 8.5.0. It may affect deployments where this credential replacement flow is reachable by a low-privilege authenticated user and does not verify that the user is authorized to manage the selected patient's portal account.

Exploit preconditions

  • Attack surface: The patient portal credential creation or replacement flow.
  • Required access: A low-privilege authenticated OpenEMR account.
  • Trigger point: Submission of replacement credentials through create_portallogin.php for a patient selected in the session.
  • Why exploitation is possible: The flow may not enforce the necessary access-control checks before changing the patient's portal credentials.

Why this happens

The underlying issue is a failure to authorize a sensitive credential change. The application may accept a patient identifier from session state without confirming that the authenticated user has permission to manage that patient's portal account. This is CWE-862: Missing Authorization—a protected operation is performed without checking the caller's privileges for the target resource.

Potential impact

  • An attacker could take over a patient's portal account.
  • The attacker may be able to read protected health information available through the portal.
  • A patient could be locked out of their account.
  • Unauthorized changes could undermine the integrity of portal access and account records.

General mitigation guidance

Defensive patterns for this class of issue include:

  • Enforcing server-side authorization checks for every credential change, tied to both the authenticated user and the specific patient account.
  • Deriving or verifying the target patient from trusted server-side context rather than relying solely on mutable session or request data.
  • Applying least privilege to account-management capabilities and separating patient self-service actions from staff administration.
  • Requiring appropriate reauthentication or additional verification for sensitive credential changes.
  • Recording and monitoring credential changes, with safeguards to help detect unexpected activity.

How teams detect issues like this

Review credential-management handlers for authorization checks that occur before any account change and confirm they validate access to the specific patient record. Static analysis and code review can look for sensitive updates that use session or request-supplied identifiers without an associated permission check. Policy enforcement can require authorization tests for cross-user resource access and credential changes; automated review tools may help identify these patterns.

Sources

SourceLink
github.comgithub.com/openemr/openemr/security/advisories/GHSA-83hq-c876-fcwf
vulncheck.comvulncheck.com/advisories/openemr-before-8.5.0-missing-authorization-via-create-portallogin-php-portal-takeover

Frequently asked

questions

The described scenario requires a low-privilege authenticated user and access to the portal credential replacement flow.

The description indicates the attacker may select a victim patient in session without the required ACL checks. It does not state that the attacker must know the victim's portal password.

Enforce server-side authorization for every credential change, verifying that the authenticated user is permitted to manage the specific patient account.

Apply consistent object-level access checks to sensitive operations, minimize trust in client-controlled or mutable identifiers, and test that users cannot change credentials for accounts outside their authorization scope.

Find out what's already
exploitable in your codebase.