Summary
Certain OpenFGA versions contain an authorization logic flaw where specific combinations of public and non-public relations can cause Check calls to return an incorrect access decision.
Under particular modeling and data conditions, a user may be granted access when they should be denied, based on how tuples and type-bound relations are evaluated.
Affected context
This vulnerability affects OpenFGA instances using versions between v1.8.5 and v1.11.2 where:
- Authorization models define relations that are both:
- Directly assignable via a type-bound public access
- Assignable via type-bound non-public access
- Tuples exist that:
- Assign the relation using a type-bound public access
- Assign the same relation on the same object using a non-public access
- Assign the same user and relation on a different object with a lexicographically larger object ID via non-public access
In such configurations, some Check evaluations on affected objects may incorrectly authorize users.
Exploit preconditions
- Attack surface: OpenFGA Check API calls (typically invoked by upstream services such as APIs, backends, or gateways).
- Required access: Ability to create or influence tuples and/or object IDs in the underlying authorization graph, or to rely on an application that already uses such a model and data layout.
- Trigger point: Execution of a Check request for an object and relation that match the problematic pattern of public and non-public tuples.
- Why exploitation is possible: The evaluation logic for type-bound relations and tuple ordering/selection does not correctly handle the coexistence of public and non-public access on the same relation across multiple objects, allowing an unintended "allow" result.
Why this happens
The root cause lies in how OpenFGA evaluates authorization policies when a relation:
- Is directly assignable by a type bound to public access, and
- Is also assignable by type bounds that are non-public, and
- Has multiple tuples across objects involving the same user and relation.
Under these conditions, the internal logic used to resolve effective permissions appears to rely on evaluation order and lexicographical properties of object IDs.
This leads to CWE-863: Improper Authorization, where access control decisions are not properly enforced according to the intended policy semantics, causing an authorization outcome that does not reflect the modeled restrictions.
Potential impact
- Users could gain read or write access to objects they should not be able to access.
- Escalation of privileges within an application that relies on OpenFGA for fine-grained authorization.
- Bypass of non-public access restrictions in certain edge-case object/tuple configurations.
- Inconsistent or unpredictable access decisions, eroding trust in authorization guarantees.
General mitigation guidance
Mitigation typically focuses on hardening authorization models and avoiding ambiguous relation semantics:
- Prefer clearly separated relations for public versus non-public access rather than mixing them under a single relation with different type bounds.
- Design models so that a relation is either public or non-public for a given object type, reducing overlap in evaluation paths.
- Use consistent, well-structured object ID schemes that are independent of authorization logic so that lexicographical ordering cannot influence access control semantics.
- Periodically review authorization models and tuples for patterns where the same user and relation appear on multiple related objects with mixed public/non-public semantics.
- Apply defense-in-depth by enforcing critical authorization checks in upstream services as well, particularly for sensitive operations.
How teams detect issues like this
Detection efforts can focus on both configuration analysis and behavioral monitoring:
- Model review: Examine authorization models for relations that:
- Are directly assignable by type-bound public access, and
- Are also assignable by type-bound non-public access.
- Tuple analysis: Search stored tuples for combinations where:
- The same object and relation have both public and non-public style assignments, and
- The same user and relation appear on multiple objects with lexicographically ordered IDs.
- Static and configuration analysis: Use policy-linting or model-validation tools to flag mixed public/non-public relation patterns that can produce ambiguous evaluation paths.
- Runtime monitoring: Log and analyze Check decisions for high-value resources, looking for unexpected "allow" outcomes in edge-case scenarios or after tuple changes.

