Summary
OpenEMR's Module Manager has installer actions that lack authorization checks and CSRF validation. A low-privilege authenticated user may be able to change module configuration, alter CCDA or HIE settings, or delete module hooks by sending requests to those actions.
Affected context
The issue affects OpenEMR versions before 8.5.0 in five Module Manager InstallerController actions. The described actions include saveConfig and SaveHooks; they lack the admin/manage_modules ACL check and CSRF validation, allowing requests from users without the required administrative permission to reach sensitive changes.
Exploit preconditions
- Attack surface: OpenEMR's web application and Module Manager installer actions
- Required access: A low-privilege authenticated account, such as a Front Office account
- Trigger point: POST requests to affected actions, including
saveConfigorSaveHooks - Why exploitation is possible: The actions do not enforce the required admin/manage_modules authorization check or validate CSRF tokens before performing changes
Why this happens
The affected actions perform privileged module-management operations without consistently verifying that the requester has the required authorization. This is a CWE-862: Missing Authorization pattern: access to an application action is not restricted according to the caller's privileges. The lack of CSRF validation also leaves these actions without a defense against forged requests in applicable browser-session scenarios.
Potential impact
- An unauthorized user may overwrite module configuration
- CCDA or HIE settings could be retargeted
- Module hooks could be deleted, potentially disrupting integrations or workflows
- Forged requests may cause changes when an authorized user's browser session is exposed to a suitable CSRF scenario
General mitigation guidance
Defensive patterns include enforcing authorization on the server for every sensitive action, using deny-by-default access controls, and requiring the appropriate module-management permission before changing configuration or hooks. Validate CSRF tokens for state-changing requests, validate configuration values against expected schemas, and limit application privileges to what the deployment requires.
How teams detect issues like this
- Review controller actions that modify module configuration or hooks for consistent server-side permission checks.
- Use static analysis or code review rules to flag state-changing actions without authorization or CSRF validation.
- Audit access-control policies to ensure sensitive operations require the intended role or permission.
- Monitor logs for configuration changes or hook deletions initiated by low-privilege accounts.
- Automated code review tools may help identify inconsistent authorization patterns across controller actions.

