/

CVE-2026-33302

Severity:

HIGH RISK

(8.1)

Incorrect Authorization in OpenEMR ACL Deny Handling

CVE-2026-33302

Analyzed

Vulnerability type

Category:

Incorrect Authorization

CWE:

CWE-863

Impact:

Privilege Bypass / Unauthorized Access

Severity:

HIGH RISK

(8.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

OpenEMR's ACL module contained an authorization flaw where the AclMain::zhAclCheck() function evaluated only "allow" rules and ignored explicit "deny" entries.

In deployments prior to 8.0.0.2, a user who belonged to any group with an "allow" entry would gain access even if an administrator explicitly set that user or group to "deny," undermining access revocation and fine-grained permission control.

Affected context

This vulnerability affects OpenEMR installations using the built-in ACL system to manage user and group permissions.

It appears where administrators rely on explicit "deny" rules to revoke or restrict access to specific modules or actions, especially in environments with overlapping user and group assignments.

The issue is most relevant in multi-role clinical environments where staff accounts belong to multiple groups (e.g., providers, billing, administrative) and where granular access control is required to protect sensitive health records.

Exploit preconditions

  • Attack surface: Application-level authorization for OpenEMR modules and features.
  • Required access: A valid user account that is a member of at least one group with "allow" ACL entries for a resource.
  • Trigger point: An access check executed via AclMain::zhAclCheck() where the user or one of their groups has an explicit "deny" entry but another group has an "allow" entry.
  • Why exploitation is possible: The ACL check function only evaluates the existence of any "allow" rule and does not honor explicit "deny" rules (allowed=0), so deny entries never override allows.

Why this happens

The core issue is an incorrect authorization design (CWE-863) in the ACL evaluation logic.

Rather than applying a clear precedence rule where explicit denies supersede allows, the AclMain::zhAclCheck() implementation effectively treats access as granted if any associated user or group has an "allow" entry, ignoring deny entries altogether.

This flawed logic breaks the principle of least privilege and makes it impossible to reliably revoke access in scenarios with overlapping user and group permissions.

Conceptually, the bug is an access-control policy evaluation error: the policy engine does not correctly interpret and enforce deny rules within the ACL model.

Potential impact

  • Users may retain access to modules or data that administrators intended to revoke.
  • Staff with multiple group memberships could access sensitive health records or administrative functions beyond their intended role.
  • Separation-of-duties policies can be bypassed, leading to conflicts of interest or policy violations.
  • Regulatory exposure due to unauthorized access to protected health information (PHI).
  • Increased risk of data misuse or accidental disclosure by users with excessive privileges.

General mitigation guidance

Effective mitigation focuses on correcting authorization logic and tightening access-control policy modeling rather than relying on specific version updates.

Recommended patterns include:

  • Designing ACL evaluation so that explicit deny rules are processed first and override any allow entries.
  • Implementing a clear precedence model (e.g., "deny > allow," or explicit user rules > group rules) and documenting it for administrators.
  • Centralizing authorization checks through a single, well-tested function rather than scattered ad hoc checks.
  • Applying the principle of least privilege when defining default roles and groups, so excess access is minimized even if misconfigurations occur.
  • Regularly reviewing ACL configurations and testing critical permission paths to confirm that revocations are effective.

How teams detect issues like this

Detection typically involves a mix of code-level and configuration-level review:

  • Static analysis and code review:
  • Look for authorization functions that only check for "allow" conditions without evaluating explicit "deny" states.
  • Identify ACL logic that short-circuits on the first "allow" match rather than evaluating the full rule set.
  • Verify that authorization decisions consider user-, group-, and context-specific rules in a predictable precedence order.
  • Policy and runtime validation:
  • Create test accounts with overlapping group memberships and verify that deny rules actually block access.
  • Use audit logs to spot users performing actions that should be disallowed according to current ACL settings.
  • Incorporate automated permission tests into CI/CD to validate that critical access paths obey deny rules after code changes.
  • Automated security review tools can assist by flagging access-control checks that do not reference deny conditions or that bypass central authorization APIs.

Sources

SourceLink
github.comgithub.com/openemr/openemr/commit/0ef9b1763029e52d43fcb4fd0ebb0769a7ec43d4
github.comgithub.com/openemr/openemr/security/advisories/GHSA-v68v-pwc4-8p2m

Frequently asked

questions

Yes, but only by authenticated users. A remote user with valid credentials can leverage the flawed ACL logic to retain or gain access to resources that administrators attempted to deny, provided they are in a group with an "allow" rule.

The attacker must already have a valid OpenEMR account and be assigned to at least one group that has an "allow" entry for the targeted resource. No special administrative privileges are required beyond that membership.

Implement a consistent authorization model where explicit denies are evaluated and given precedence over allows, centralize all ACL checks in a single trusted function, and add tests that verify deny rules actually revoke access even when allow rules are present.

Use a well-defined access-control policy model (such as RBAC with clear precedence rules), enforce all checks through a unified authorization layer, add automated tests for permission boundaries, and conduct regular reviews of both code and ACL configurations to ensure that revocation behaves as expected.

Find out what's already
exploitable in your codebase.