Miggo Logo

CVE-2025-48371: OpenFGA Authorization Bypass

N/A

CVSS Score

Basic Information

EPSS Score
0.03661%
Published
5/23/2025
Updated
5/23/2025
KEV Status
No
Technology
TechnologyGo

Technical Details

CVSS Vector
-
Package NameEcosystemVulnerable VersionsFirst Patched Version
github.com/openfga/openfgago>= 1.8.0, < 1.8.131.8.13

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability lies in the CombinedTupleReader.ReadUsersetTuples method, which is responsible for reading userset tuples, including contextual tuples. The provided commit e5960d4eba92b723de8ff3a5346a07f50c1379ca directly addresses this by modifying the filtering logic within ReadUsersetTuples.

The patch introduces a new helper function tupleMatchesAllowedUserTypeRestrictions and calls it within ReadUsersetTuples to ensure that contextual tuples are filtered according to the AllowedUserTypeRestrictions specified in the query. Before this change, the code only checked if the user part of a contextual tuple was a UserSet (if tuple.GetUserTypeFromUser(t.GetKey().GetUser()) == tuple.UserSet) without properly validating against the specific type restrictions (e.g., wildcard vs. direct relation). This lack of precise filtering allowed for an authorization bypass under the conditions described in the advisory: when a model has a relationship assignable by both type-bound public access and a userset, and a contextual tuple with a userset is provided for that relationship, but type-bound public access tuples are not assigned. In such cases, the overly permissive filtering in ReadUsersetTuples could lead to incorrect authorization decisions. The Check and ListObjects APIs, mentioned as affected in the advisory, would rely on this underlying tuple reading mechanism, making ReadUsersetTuples the core vulnerable function whose incorrect behavior leads to the bypass.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

### Ov*rvi*w Op*n*** v*.*.* to v*.*.** ( op*n***-*.*.** <= **lm ***rt <= op*n***-*.*.**, v*.*.* <= *o*k*r <= v.*.*.**) *r* vuln*r**l* to *ut*oriz*tion *yp*ss w**n **rt*in ****k *n* ListO*j**t **lls *r* *x**ut**. ### *m I *****t**? I* you *r* usin*

Reasoning

T** vuln*r**ility li*s in t** `*om*in**Tupl*R****r.R***Us*rs*tTupl*s` m*t*o*, w*i** is r*sponsi*l* *or r***in* us*rs*t tupl*s, in*lu*in* *ont*xtu*l tupl*s. T** provi*** *ommit `****************************************` *ir**tly ***r*ss*s t*is *y mo*i