/

CVE-2026-124475

Severity:

HIGH RISK

(7.1)

IDOR (CWE-639) in OpenEMR Patient Settings Handler

CVE-2026-124475

Analyzed

Vulnerability type

Category:

Insecure Direct Object Reference (IDOR)

CWE:

CWE-639

Impact:

Unauthorized modification of other patients' settings

Severity:

HIGH RISK

(7.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 an insecure direct object reference in the patient portal settings handler that can let an authenticated patient change settings belonging to another patient. The risk arises when the application accepts a patient identifier supplied with a settings request without verifying that the requester is authorized to act on that patient's records.

Affected context

The issue occurs in portal/lib/persist.php when patient portal settings are written. An authenticated portal patient may be able to target another patient by supplying an arbitrary setting_patient value, if the application does not bind that value to the authenticated user's authorized patient identity.

Exploit preconditions

  • Attack surface: Patient portal settings functionality
  • Required access: An authenticated patient portal account
  • Trigger point: A request that inserts or updates a patient setting
  • Why exploitation is possible: The supplied setting_patient value may be trusted without an effective authorization check tying it to the authenticated patient

Why this happens

The underlying issue is a missing object-level authorization check. The application uses a client-supplied identifier to select the patient record being modified without adequately confirming that the authenticated user is permitted to act on that patient. This is an insecure direct object reference mapped to CWE-639: Authorization Bypass Through User-Controlled Key.

Potential impact

  • An attacker may suppress notifications for other patients.
  • An attacker could alter consent-related flags.
  • An attacker may change other patients' portal preferences.
  • Unauthorized changes could undermine the integrity of patient settings and related workflows.

General mitigation guidance

Defensive patterns focus on enforcing authorization for every patient-specific operation:

  • Derive the patient identity from the authenticated session where possible instead of trusting a client-supplied identifier.
  • Apply object-level authorization checks before inserting or updating settings.
  • Restrict settings updates to an explicit allowlist of fields and permitted values.
  • Use least-privilege database access and avoid broad write permissions for portal operations.
  • Treat identifiers and other request data as untrusted, even when submitted by authenticated users.

How teams detect issues like this

  • Review settings handlers for writes keyed by request-supplied patient identifiers.
  • Use static analysis or code review checks to flag database updates without nearby object-level authorization.
  • Test authorization policies by confirming that one authenticated patient cannot read or modify another patient's settings.
  • Monitor audit logs for settings changes where the target patient differs from the authenticated patient's identity.

Sources

SourceLink
github.comgithub.com/openemr/openemr/security/advisories/GHSA-jvhx-fg6j-8c9x
vulncheck.comvulncheck.com/advisories/openemr-before-8.3.0-idor-via-portal-lib-persist-php-setting-patient

Frequently asked

questions

The described attack requires an authenticated patient portal account; the account may be able to target settings associated with other patients if authorization checks are insufficient.

They may be able to insert or overwrite patient settings, including notification, consent-related, or portal preference values.

Bind operations to the authenticated patient's identity where possible and perform an explicit authorization check for the target patient before each write.

Treat all client-supplied object identifiers as untrusted, enforce object-level authorization consistently, and test cross-account access boundaries.

Find out what's already
exploitable in your codebase.