CVE-2026-134020: OpenEMR: Missing authorization on the portal OnsiteActivityView API discloses every patient's demographics and Social Security number
OpenEMR is a free and open source electronic health records and medical practice management application. Prior to 8.5.0, the staff-facing portal endpoints GET api/onsiteactivityviews and GET api/onsiteactivityview/{id}, mapped to OnsiteActivityView.Query and OnsiteActivityView.Read with pacl = pnone in portal/patient/appconfig.php, are handled without an authorization check for an authenticated staff session whose bootstrappid is empty. portal/patient/machineconfig.php admits that authenticated staff session, and portal/patient/fwk/libs/verysimple/Phreeze/GenericRouter.php applies the route ACL only when bootstrappid is nonempty, so the staff request bypasses the pnone check. OnsiteActivityViewController::Query() returns records without patient scoping, and OnsiteActivityViewController::Read() loads a record by identifier without checking ACL or ownership; OnsiteActivityViewReporter::GetCustomQuery() joins portal activity to patient demographics and includes names, dates of birth, addresses, and Social Security numbers. Any authenticated staff account, including one without the patients/demo permission, can therefore read sensitive demographics for patients represented by an existing onsiteportalactivity row; at least one such row must exist for the endpoint to return patient data. This issue is fixed in version 8.5.0.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 8.5.0
Event History
Frequently Asked Questions
Who can exploit this issue?
Any authenticated OpenEMR staff account can exploit it, including an account that does not have the patients/demo permission. The vulnerable requests are made through the staff-facing portal with an empty bootstrap_pid session value.
What data can be exposed?
The affected API responses can disclose patient demographics, including names, dates of birth, addresses, and Social Security numbers. The query endpoint returns records without patient scoping, while the read endpoint retrieves a record by identifier without ACL or ownership validation.
Which endpoints are affected?
The affected staff portal endpoints are GET api/onsiteactivityviews and GET api/onsiteactivityview/{id}, mapped to OnsiteActivityView.Query and OnsiteActivityView.Read.
What versions are affected?
OpenEMR versions prior to 8.5.0 are affected.