Summary
A broken access control issue in OpenEMR's order types management system allows low-privilege users, such as Receptionists, to add and modify procedure types through the types_edit.php endpoint.
When a user with insufficient privileges can change procedure configurations, they may influence ordering workflows, billing behavior, or clinical documentation without proper authorization.
Affected context
This vulnerability occurs in OpenEMR instances where role-based permissions do not properly restrict access to the order types management feature.
Specifically, the /openemr/interface/orders/types_edit.php endpoint can be reached and used by low-privilege accounts (e.g., Receptionist) that should only interact with daily workflow tasks rather than administrative configuration.
The risk is most relevant in deployments where procedure types drive clinical, billing, or operational processes and are assumed to be managed only by privileged staff or administrators.
Exploit preconditions
- Attack surface: Web application endpoint
/openemr/interface/orders/types_edit.php - Required access: Valid but low-privilege OpenEMR account (e.g., Receptionist role)
- Trigger point: Submitting crafted HTTP requests (GET/POST) to add or modify order/procedure types via the management interface
- Why exploitation is possible: The endpoint does not consistently enforce role-based authorization or capability checks, allowing functionality intended for higher-privilege users to be exercised by roles that should not have configuration control
Why this happens
The vulnerability stems from missing or insufficient authorization checks on a sensitive configuration endpoint.
Instead of validating that the caller holds an appropriate administrative or configuration-management privilege, the application either relies solely on authentication or performs only basic checks that do not align with the principle of least privilege.
This aligns with CWE-862: Missing Authorization, where a system exposes operations that change security- or business-critical settings without verifying the user's authorization level.
At a design level, configuration operations are treated similarly to routine workflow operations, rather than being isolated behind stricter access control rules.
Potential impact
- Low-privilege users could create new procedure types that may influence clinical or operational workflows.
- Existing procedure types could be modified, potentially altering billing codes, descriptions, or ordering logic.
- Data integrity issues may arise in medical records, reports, and analytics due to tampered procedure definitions.
- Fraudulent or abusive billing scenarios could be facilitated by manipulating procedure types.
- Confusion among clinical staff may occur if expected procedure catalogs or order options are silently changed.
General mitigation guidance
Effective mitigation focuses on tightening authorization and separating configuration duties from routine user roles.
Common patterns include:
- Enforcing explicit role- or capability-based checks on all configuration endpoints, including order and procedure type management.
- Centralizing access control logic so that sensitive operations cannot bypass policy enforcement via alternative paths.
- Applying the principle of least privilege: limit configuration capabilities to dedicated administrative or clinical leadership roles and ensure low-privilege roles are read-only for reference data.
- Implementing defense-in-depth via UI and backend checks, ensuring that removing a button in the interface is not the only control and that server-side verification is always performed.
- Periodically reviewing role definitions and permission mappings to ensure that "helper" roles (like Receptionist) do not accumulate administrative powers.
How teams detect issues like this
Detection can combine code-level review with runtime monitoring:
- Code review and static analysis:
- Search for sensitive endpoints (e.g., under
/interface/orders/*) that change configuration and verify they all call centralized authorization utilities. - Flag controllers or scripts that rely solely on authentication checks without verifying specific roles or capabilities.
- Enforce policies where all configuration-modifying actions must declare and check explicit permissions.
- Automated testing:
- Include authorization tests where low-privilege test accounts attempt to access administrative configuration endpoints and verify they are denied.
- Use regression tests to ensure newly added endpoints follow existing access control patterns.
- Operational monitoring:
- Log configuration changes to procedure or order types, including actor identity and role, and alert on unexpected roles performing such changes.
- Periodically review audit logs for patterns of low-privilege users accessing configuration functionality.

