Summary
OpenEMR contains a missing authorization check in the patient billing notes endpoint, allowing authenticated users with low-privilege accounts to access and change notes they should not be permitted to manage. The risk arises when the endpoint accepts requests for patient records without verifying that the requesting user is authorized for those records.
Affected context
The issue is reported in OpenEMR versions before 8.3.0 and affects interface/billing/sl_eob_patient_note.php. The endpoint handles patient billing notes, and the vulnerability exists when access to a requested patient record is not checked against the authenticated user's permissions. Patient identifiers may be supplied through the patient_id parameter.
Exploit preconditions
- Attack surface: The patient billing notes endpoint
- Required access: An authenticated account, including a low-privilege account
- Trigger point: Requests to view or modify billing notes using a patient identifier
- Why exploitation is possible: The endpoint does not adequately verify that the user is authorized to access or change the selected patient's notes. The reported attack uses the embedded CSRF token in POST requests.
Why this happens
The endpoint fails to enforce authorization for the requested patient record. This maps to CWE-862: Missing Authorization: a system performs an operation without checking whether the authenticated user is permitted to perform it on the specific resource. Authentication and the presence of a CSRF token do not replace resource-level authorization checks.
Potential impact
- Unauthorized users may read confidential billing notes
- Patient billing records may be altered without proper permission
- Unauthorized changes could affect the accuracy and integrity of billing information
- Exposure or tampering may create privacy, operational, or compliance risks
General mitigation guidance
Defensive patterns focus on consistently enforcing authorization at the server for every operation involving a patient record.
- Check the authenticated user's permissions against the specific patient and action requested.
- Apply the same authorization policy to both read and write operations.
- Treat patient identifiers supplied by a client as untrusted; do not rely on obscurity or unpredictable IDs for access control.
- Use deny-by-default access policies and grant only the permissions required for each role.
- Keep CSRF protections as a separate defense; they do not establish that a user is authorized to access a record.
How teams detect issues like this
- Review patient-facing and billing endpoints for resource-level authorization checks on every read and write path.
- Use static analysis or code review checks to flag handlers that use request-supplied patient identifiers without an associated permission check.
- Test access policies with accounts of different roles and verify that users cannot access records outside their permitted scope.
- Monitor for repeated requests involving many patient identifiers and for unexpected changes to billing notes.

