CVE-2026-137181: CVE-2026-137181: Incorrect Authorization via Improper Context Cancellation Propagation in OpenFGA
CVE-2026-137181: Incorrect Authorization via Improper Context Cancellation Propagation in OpenFGA Vulnerability ID: CVE-2026-137181 CVSS Score: 7.1 Published: 2026-12-01 CVE-2026-137181 (GHSA-637h-v79h-mvqf) is an i
CVE-2026-137181: Incorrect Authorization via Improper Context Cancellation Propagation in OpenFGA
Vulnerability ID: CVE-2026-137181
CVSS Score: 7.1
Published: 2026-12-01
CVE-2026-137181 (GHSA-637h-v79h-mvqf) is an incorrect authorization vulnerability (CWE-863) in OpenFGA versions 1.10.3 through 1.22.x. The graph evaluation engine fails to distinguish between normal stream exhaustion and context cancellations or deadline exceedances during concurrent set evaluations. When resolving models using relational set operations (and, or, but not), an aborted worker branch can be evaluated as empty rather than errored, causing the engine to return unauthorized access grants (Allowed: true). When query caching is enabled, these erroneous evaluation states can be persisted to the in-memory cache, poisoning subsequent authorization checks.
TL;DR
OpenFGA versions >= 1.10.3 and < 1.23.0 improperly handle context cancellations and timeouts during concurrent permission graph traversal. In authorization models utilizing set operators like 'but not', a timed-out exclusion check is treated as an empty set rather than an evaluation error, resulting in unauthorized access grants and potential query cache poisoning.
Technical Details
- CVE ID: CVE-2026-137181 (GHSA-637h-v79h-mvqf)
- Weakness Class: CWE-863: Incorrect Authorization
- CVSS v4.0 Score: 7.1 High (CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:H/VA:N/SC:H/SI:H/SA:N)
- Affected Versions: OpenFGA >= 1.10.3, < 1.23.0
- Patched Version: OpenFGA 1.23.0
- Affected Endpoints: Check, BatchCheck, ListObjects, StreamedListObjects
- Impact: Unauthorized access grant (Allowed: true) and query cache poisoning
- CISA KEV Status: Not Listed
Affected Systems
- OpenFGA (>= 1.10.3, < 1.23.0)
-
OpenFGA: >= 1.10.3, < 1.23.0 (Fixed in:
1.23.0)
Code Analysis
Commit: 9b42073
Improve error propagation through graph reducers and iterators. Tighten buffered result handling, cache writes, and planner statistics, and extend regression coverage.
--- a/internal/check/check.go
+++ b/internal/check/check.go
@@ -357,6 +357,9 @@ func (r *Resolver) executeStrategy(ctx context.Context, selector planner.Selecto
res, err := fn()
duration := time.Since(start)
span.SetAttributes(attribute.Int64("strategy_duration_ms", duration.Milliseconds()))
+ if err == nil {
+ err = ctx.Err()
+ }
if err != nil {
--- a/internal/graph/cached_resolver.go
+++ b/internal/graph/cached_resolver.go
@@ -197,6 +197,10 @@ func (c *CachedCheckResolver) ResolveCheck(
return resp, nil
}
+ if ctx.Err() != nil {
+ return resp, nil
+ }
+
clonedResp := resp.clone()
--- a/internal/graph/weight_two_resolver.go
+++ b/internal/graph/weight_two_resolver.go
@@ -171,11 +175,10 @@ ConsumerLoop:
t, err := msg.Iter.Next(ctx)
if err != nil {
msg.Iter.Stop()
- if storage.IterIsDoneOrCancelled(err) {
- break
+ if !errors.Is(err, storage.ErrIteratorDone) {
+ lastErr = err
}
- lastErr = err
- continue
+ break
}
Mitigation Strategies
- Upgrade OpenFGA binaries, containers, and Go dependencies to version 1.23.0 or later.
- Disable the check query cache (--check-query-cache-enabled=false) on unpatched instances to prevent cache poisoning from cancelled requests.
- Ensure the ListObjects pipeline optimization remains enabled (--listObjects-pipeline-enabled=true) to avoid vulnerable legacy graph traversal paths in ListObjects and StreamedListObjects.
- Adjust server-side deadline thresholds and database pool capacities to reduce timeout frequency under load.
Remediation Steps:
- Identify all running OpenFGA instances and library dependencies with versions >= 1.10.3 and < 1.23.0.
- Pull the patched container image (docker pull openfga/openfga:v1.23.0) or update the Go module (go get github.com/openfga/[email protected]).
- Deploy the updated service and restart all OpenFGA nodes to flush any existing in-memory query caches.
- Verify that context cancellation errors properly propagate as errors in application logs rather than returning fallback evaluation decisions.
References
- GitHub Security Advisory: GHSA-637h-v79h-mvqf
- OpenFGA Official Fix Commit (9b420733fc2ef7607e3287405ebaad144c90775e)
- OpenFGA Release v1.23.0
- CVE.org Record: CVE-2026-137181
- NVD National Vulnerability Database: CVE-2026-137181
- CVEListV5 JSON Record: CVE-2026-137181
Read the full report for CVE-2026-137181 on our website for more details including interactive diagrams and full exploit analysis.
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.