CVE-2026-137181 — Openfga Helm Charts (all Versions) — CWE-863
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: 1. An application uses Check, BatchCheck, or ListObjects/StreamedListObjects with `--listObjects-pipeline-enabled=false` to enforce access, and 2. The authorization model contains a relation that (directly or through other relations) uses `and`, `or` or `but not`, and 3. One of the following occurs: - A request reaches its server-side deadline (`--request-timeout`, or `--listObjects-deadline` for 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.
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: 1. An application uses Check, BatchCheck, or ListObjects/StreamedListObjects with `--listObjects-pipeline-enabled=false` to enforce access, and 2. The authorization model contains a relation that (directly or through other relations) uses `and`, `or` or `but not`, and 3. One of the following occurs: - A request reaches its server-side deadline (`--request-timeout`, or `--listObjects-deadline` for 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.
🎯 What is this vulnerability?
CWE‑863 – Incorrect Authorization
OpenFGA is a policy‑driven authorization engine that evaluates authorization models (collections of relations) to decide whether a subject may perform an action on an object. In versions 1.10.3 through 1.23.0 the engine contains a logic flaw that can return incorrect “allow” or “deny” results under two specific circumstances:
1. Deadline‑premature cancellation
The server is configured with a server‑side deadline* (the maximum time the engine may spend evaluating a request).
* When a model contains relations that use logical operators (and, or, but not and), the evaluation can become complex and may exceed the deadline.
If the deadline expires before the evaluation finishes, the engine may return an intermediate result* that is not the final, correct decision.
* Because the request is still considered “successful” from the client’s perspective, the client receives an incorrect authorization verdict.
2. Cache poisoning via early cancellation
* When the flag --check-query-cache-enabled is turned on, the engine caches the result of a Check or BatchCheck request.
If the client cancels the request, the deadline expires, or another branch of the evaluation settles early, the unfinished* (and thus incorrect) result can be cached.
* Subsequent requests that hit the same cache key will receive the stale, incorrect verdict, effectively “poisoning” the cache.
Because the flaw is purely an authorization logic error (no authentication bypass or code execution), the impact is limited to confidentiality, integrity, and privilege escalation. The CVSS vector reflects this:
- AV:N (network‑only) – the attack can be performed over the network.
- AC:L (low) – minimal effort.
- AT:P (physical) – not required.
- PR:L (low) – the attacker only needs a low‑privilege account or even no account if the endpoint is public.
- UI:N (no user interaction) – automated.
- VI:H, SC:H, SI:H – high impact on integrity, confidentiality, and privilege escalation.
- VA:N, SA:N – no availability or session‑related impact.
⚡ Attack Chain
NOTE: The exact URI paths (/v1/check,/v1/batchCheck, etc.) are not specified in the CVE text. The following example uses the most common OpenFGA endpoints as an illustrative representation of the attack class.
1. Discovery & Reconnaissance
| Step | Technique | What you learn |
|---|---|---|
| 1.1 | Network scanning (e.g., nmap -p 8080,9090 <target>) | Identify OpenFGA service listening on a known port. |
| 1.2 | Banner grabbing (curl -I http://<target>:8080/health) | Verify the presence of OpenFGA and obtain the version from the X-OpenFGA-Version header or /health JSON. |
| 1.3 | API enumeration (curl http://<target>:8080/v1/health) | Confirm that the service exposes the /v1/check endpoint and that the version is ≤ 1.23.0. |
If the service is behind a reverse proxy, you may need to discover the upstream path by inspecting the proxy configuration or by trial‑and‑error.
2. Exploitation
2.1 Crafting a malicious Check request
The attacker sends a Check request that references a model containing a complex relation (e.g., viewer AND (editor OR admin)). The request is deliberately timed to exceed the server‑side deadline.
# Illustrative endpoint: /v1/check
curl -X POST http://<target>:8080/v1/check \
-H "Content-Type: application/json" \
-H "X-OpenFGA-Deadline: 10ms" \ # <‑‑ very short deadline
-d '{
"model_id": "complex_policy",
"user": "alice",
"relation": "viewer",
"object": "document:123"
}'What happens?
viewer AND (editor OR admin). 10 ms) expires before the evaluation completes. allowed: true/false.2.2 Poisoning the cache
If the server is running with --check-query-cache-enabled, the attacker can force the cache to store the incorrect result:
# Same request, but with a cache‑enabled flag (if exposed via header)
curl -X POST http://<target>:8080/v1/check \
-H "Content-Type: application/json" \
-H "X-OpenFGA-Deadline: 10ms" \
-H "X-OpenFGA-Cache-Enabled: true" \
-d '{
"model_id": "complex_policy",
"user": "alice",
"relation": "viewer",
"object": "document:123"
}'After the deadline expires, the engine caches the incorrect verdict.
Subsequent legitimate requests for the same (model_id, user, relation, object) tuple will hit the cache and receive the poisoned result, granting unauthorized access.
2.3 Exploiting ListObjects / StreamedListObjects
When --listObjects-pipeline-enabled=false, the same deadline‑premature logic applies to ListObjects and StreamedListObjects. An attacker can request a list of objects that the user should not see; the engine may return a truncated or incorrect list, potentially leaking sensitive object identifiers.
curl -X POST http://<target>:8080/v1/listObjects \
-H "Content-Type: application/json" \
-H "X-OpenFGA-Deadline: 5ms" \
-d '{
"model_id": "complex_policy",
"user": "alice",
"relation": "viewer",
"object_type": "document"
}'3. Post‑Exploitation
Once the attacker obtains an incorrect “allow” verdict:
1. Privilege Escalation – The attacker can perform actions reserved for higher‑privileged roles (e.g., edit or delete documents, access admin dashboards).
2. Data Exfiltration – By repeatedly listing objects or checking permissions, the attacker can enumerate a large set of resources that should be hidden.
3. Persistence – The attacker may create new policies or modify existing ones (if the API permits) to maintain unauthorized access.
Because the flaw is purely an authorization logic bug, there is no direct code execution. However, the ability to bypass authorization can be leveraged to compromise the entire application’s data integrity and confidentiality.
🌍 Real World Impact
| Impact | CVSS Component | Explanation |
|---|---|---|
| Confidentiality | VI:H | Unauthorized users can read data they should not see. |
| Integrity | SC:H | Attackers can modify or delete data, or create policies that grant themselves elevated privileges. |
| Privilege Escalation | SI:H | Users can gain higher‑level permissions than intended. |
| Availability | VA:N | No direct impact. |
| Session | SA:N | No impact. |
Practical consequences:
🛡️ Remediation & Mitigation
1. Patch
| Affected Versions | Fixed In |
|---|---|
| 1.10.3 – 1.23.0 (inclusive) | 1.23.0+ |
Action: Upgrade OpenFGA to ≥ 1.23.0. The patch removes the premature deadline handling and ensures that cache entries are only written after a complete evaluation.
2. Workarounds (if upgrade is not immediately possible)
| Setting | Effect | How to Apply |
|---|---|---|
--check-query-cache-enabled=false | Disables caching of Check results, preventing cache poisoning. | Edit the OpenFGA configuration file or command‑line flags. |
--listObjects-pipeline-enabled=true | Re‑enables the pipeline that correctly handles complex relations. | Set the flag to true in the config. |
| Increase server‑side deadline | Gives the engine more time to finish evaluation, reducing premature returns. | Adjust the deadline parameter (e.g., X-OpenFGA-Deadline: 500ms). |
| Disable public Check endpoints | Prevents unauthenticated users from triggering the flaw. | Configure the reverse proxy or OpenFGA to require authentication for /v1/check and related endpoints. |
3. Detection
| Log Pattern | Indicator of Compromise (IoC) |
|---|---|
Check request for model_id=complex_policy, user=alice, relation=viewer, object=document:123 | Normal request |
Check request timed out after 10ms | Potential premature deadline |
Cache miss for key=... followed by Cache hit with incorrect result | Cache poisoning |
ListObjects returned 0 objects for user=alice when the user should see many | Incorrect list result |
WAF / ModSecurity rule (illustrative)
SecRule REQUEST_HEADERS:X-OpenFGA-Deadline "@rx ^\d+ms$" \
"id:1001,phase:2,deny,status:400,msg:'OpenFGA deadline too short'"This rule blocks requests that set an unrealistically short deadline (e.g., < 50 ms), which is a common trigger for the vulnerability.
4. Monitoring
Check or ListObjects requests with deadline headers and allowed: true that later fail when the action is attempted.⚠️ Urgency
/v1/check and /v1/listObjects endpoints until the upgrade is complete.[🤖 CVE Professor AI Security Engine]
FOFA Query