Incorrect Authorization in OpenFGA During Request Timeouts and Cancellations
Description
In OpenFGA, the Check or BatchCheck APIs, as well as ListObjects or StreamedListObjects with --listObjects-pipeline-enabled=false, could return incorrect results.
Preconditions
This applies if all of the following are true:
- Your application uses Check, BatchCheck, or ListObjects/StreamedListObjects with
--listObjects-pipeline-enabled=falseto enforce access, and - The authorization model contains a relation that (directly or through other relations) uses
and,ororbut not, and - One of the following occurs:
- A request reaches its server-side deadline (
--request-timeout, or--listObjects-deadlinefor ListObjects) before evaluation finishes. That request could return an incorrect result. - Check query caching is enabled (
--check-query-cache-enabled) and a Check is cancelled before it finishes due to a client cancellation, a deadline, or OpenFGA cancelling a branch once another branch has settled the result. The check could cache an incorrect result that later requests reuse.
Fix
Upgrade to OpenFGA v1.23.0 or greater.
Acknowledgements
OpenFGA would like to thank @andrewloux for the discovery, responsible disclosure, and remediation.