Summary
OpenEMR before 8.5.0 has missing authorization checks in patient-related endpoints, allowing authenticated users to create patient records and access patient information beyond their intended permissions. Depending on the endpoint, exposed data may include names, Social Security numbers, dates of birth, and insurance information.
Affected context
The issue affects patient-management functionality in OpenEMR versions before 8.5.0. The described endpoints include new_comprehensive_save.php, new_search_popup.php, and patient_select.php, where authorization checks such as aclCheckCore() are omitted. Risk arises when an authenticated user can reach these endpoints without an effective permission check for the requested operation or patient data.
Exploit preconditions
- Attack surface: OpenEMR patient-management web endpoints
- Required access: An authenticated account; the description does not specify a required privilege level
- Trigger point: Requests to patient creation or search/selection endpoints
- Why exploitation is possible: The affected paths omit authorization checks, so authentication alone may be sufficient to perform actions or retrieve information that should be permission-controlled
Why this happens
The underlying issue is a failure to enforce authorization at sensitive patient-management operations. Omitting access-control checks allows authenticated users to reach functionality or data outside their intended permissions, mapping to CWE-862: Missing Authorization. Authentication establishes a user's identity, but does not by itself establish permission to create records or view particular patients.
Potential impact
- Authenticated users may create patient records without appropriate authorization
- Patient names, Social Security numbers, dates of birth, or insurance information could be disclosed
- Unauthorized record creation could affect the accuracy and integrity of patient data
- Exposure of sensitive health information could lead to privacy and compliance consequences
General mitigation guidance
Defensive patterns focus on enforcing authorization consistently at every sensitive operation and data access point.
- Apply deny-by-default access controls to patient creation, search, and selection actions
- Check permissions for the specific operation and patient record on the server side
- Treat authentication and authorization as separate requirements
- Minimize the data returned by search and selection endpoints to what the user needs
- Use least-privilege roles and review permission boundaries across patient workflows
- Add centralized authorization controls where practical, while preserving checks at sensitive resource boundaries
How teams detect issues like this
Review patient-related routes and handlers for missing or inconsistently applied authorization checks, especially around record creation and patient search. Static analysis and code review can flag sensitive endpoints that lack access-control enforcement or rely only on authentication. Test authorization policies across roles and patient records, and monitor for unusual record-creation activity or broad access to patient identifiers.

