/

CVE-2026-124447

Severity:

HIGH RISK

(8.1)

IDOR (CWE-639) in OpenEMR OnsitePortalActivity Update

CVE-2026-124447

Analyzed

Vulnerability type

Category:

Insecure Direct Object Reference (IDOR)

CWE:

CWE-639

Impact:

Unauthorized data disclosure and modification

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 onsite portal activity update logic may authorize changes using the patient ID supplied in a request rather than checking the stored record's owner. An authenticated portal patient who can reference another patient's activity record may disclose data or alter its narrative, status, and ownership.

Affected context

The issue occurs in OnsitePortalActivityController::Update() when handling updates through the onsite portal activity API. It becomes risky when a portal patient can submit an update for an activity record belonging to someone else and the authorization check trusts the request's patientId instead of verifying the owner stored with that record.

Exploit preconditions

  • Attack surface: The onsite portal activity API's update operation
  • Required access: An authenticated portal patient account
  • Trigger point: An update request that references another patient's activity record
  • Why exploitation is possible: The ownership check uses the request-supplied patient ID rather than validating the target record's stored owner

Why this happens

The controller makes an object-level authorization decision using caller-controlled identity data instead of the ownership relationship associated with the requested record. This is an insecure direct object reference, mapped to CWE-639: Authorization Bypass Through User-Controlled Key. Authorization should be based on the authenticated principal and the persisted record, not on an identity value supplied with the request.

Potential impact

  • An authenticated patient may disclose another patient's activity data, including table arguments and checksum information.
  • An attacker could overwrite activity narratives or status.
  • An attacker may be able to take ownership of another patient's activity record.
  • Unauthorized changes could affect record integrity and patient privacy.

General mitigation guidance

Defensive patterns focus on enforcing object-level authorization against trusted identity and persisted ownership data:

  • Derive the acting patient's identity from the authenticated session rather than trusting a request field.
  • Verify that the authenticated patient is authorized to access the target record before reading or changing it.
  • Apply the same ownership checks consistently to every operation on the resource.
  • Minimize sensitive data returned by update endpoints and validate changes against an explicit schema.
  • Follow least privilege for portal accounts and service operations.

How teams detect issues like this

Review update handlers for authorization decisions that rely on request-supplied owner or patient identifiers. Use static analysis or code review checks to flag object lookups followed by mutations without a persisted-owner check. Test authorization policies to confirm that one patient's identity cannot access or modify another patient's records, and enforce these checks in shared API middleware or policy layers where practical.

Sources

SourceLink
github.comgithub.com/openemr/openemr/security/advisories/GHSA-5hx3-92fw-6jm6
github.comgithub.com/openemr/openemr/security/advisories/GHSA-x8rm-m66w-qhh5
vulncheck.comvulncheck.com/advisories/openemr-before-8.3.0-idor-via-onsiteportalactivitycontroller-update-endpoint

Frequently asked

questions

The described attack requires an authenticated portal patient account and access to the onsite portal activity update endpoint.

The described behavior does not require them; the authorization flaw involves supplying the attacker's own patient identity while referencing another patient's activity record. Access to the endpoint is still required.

Check access to the target record using the authenticated patient's identity and the record's persisted ownership before returning or modifying it.

Centralize object-level authorization, avoid trusting client-supplied ownership identifiers, and test cross-account access boundaries for every resource operation.

Find out what's already
exploitable in your codebase.