Summary
OpenEMR's prior-authorization module has authorization checks that may not adequately restrict access to patient records. An authenticated low-privilege user could use the affected report and record-handling functions to view or modify other patients' prior-authorization information.
Affected context
The issue is in the oe-module-prior-authorizations module of OpenEMR. The described exposure involves public/reports/list_report.php, which may return patient and insurance details, and public/index.php, where record identifiers may be accepted without sufficient authorization checks. Risk depends on whether an authenticated user can reach these functions and whether access is properly scoped to the user's permissions and patient context.
Exploit preconditions
- Attack surface: The prior-authorizations module's report and record-handling endpoints
- Required access: An authenticated account with low privileges
- Trigger point: Requesting the report or submitting a patient or authorization record identifier
- Why exploitation is possible: Authorization checks may not verify that the requested record is within the user's permitted scope
Why this happens
The underlying issue is missing or insufficient authorization enforcement, mapped to CWE-862. Insecure direct object reference behavior can occur when an application uses a caller-supplied identifier to select a record but does not independently confirm that the caller is authorized to access or change it. Authentication alone does not establish permission to view or modify every patient's data.
Potential impact
- Patient names, MRNs, insurance details, and prior-authorization information could be disclosed
- A low-privilege user could modify prior-authorization records belonging to other patients
- Unauthorized changes could affect the accuracy and integrity of patient or insurance workflows
- Exposure or alteration of sensitive health information could create privacy and compliance consequences
General mitigation guidance
Common defensive patterns focus on enforcing authorization at every data access and modification boundary:
- Apply server-side, deny-by-default authorization checks to reports and record operations
- Scope queries to the authenticated user's permitted patients and roles rather than trusting submitted identifiers
- Use secure-by-default data-access abstractions that require an authorization context
- Minimize the amount of sensitive information returned by reports
- Keep application accounts and service permissions limited to the access they need
How teams detect issues like this
- Review report and update handlers for authorization checks performed before data is returned or changed
- Use static analysis and code review to identify direct database lookups based on request-supplied identifiers
- Test access-control policies with users of different roles and with records outside their authorized scope
- Enforce policies requiring object-level authorization for sensitive patient data in API and web endpoints
- Monitor for unusual report access and record changes across patient boundaries; automated security review tools may help identify relevant patterns

