Ecosyste.ms: Advisories
An open API service providing security vulnerability metadata for many open source software ecosystems.
Security Advisories: GSA_kwCzR0hTQS0yaG05LWg4NzMtcGdxaM4AA2IH
OpenFGA Vulnerable to DoS from circular relationship definitions
Overview
OpenFGA is vulnerable to a DoS attack when certain Check calls are executed against authorization models that contain circular relationship definitions. When the call is made, it's possible for the server to exhaust resources and die.
Am I Affected?
Yes, if your store contains an authorization model that allows circular relationships. For example, with this model:
model
schema 1.1
type user
type group
relations
define memberA: [user] or memberB or memberC or memberD or memberE
define memberB: [user] or memberA or memberC or memberD or memberE
define memberC: [user] or memberA or memberB or memberD or memberE
define memberD: [user] or memberA or memberB or memberC or memberE
define memberE: [user] or memberA or memberB or memberC or memberD
This Check: (user:anne, memberA, group:X)
can exhaust memory in the server.
Fix
Upgrade to v1.3.2 and update any offending models.
[BREAKING] If your model contained cycles or a relation definition that has the relation itself in its evaluation path, then Checks and queries that require evaluation will no longer be evaluated on v1.3.2+ and will return errors instead. You will need to update your models to remove the cycles.
Permalink: https://github.com/advisories/GHSA-2hm9-h873-pgqhJSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS0yaG05LWg4NzMtcGdxaM4AA2IH
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Moderate
Classification: General
Published: 7 months ago
Updated: 6 months ago
CVSS Score: 5.9
CVSS vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
Identifiers: GHSA-2hm9-h873-pgqh, CVE-2023-43645
References:
- https://github.com/openfga/openfga/security/advisories/GHSA-2hm9-h873-pgqh
- https://nvd.nist.gov/vuln/detail/CVE-2023-43645
- https://github.com/openfga/openfga/commit/725296025fd81227c89525808652c6acd4a605f6
- https://github.com/advisories/GHSA-2hm9-h873-pgqh
Blast Radius: 1.0
Affected Packages
go:github.com/openfga/openfga
Dependent packages: 0Dependent repositories: 0
Downloads:
Affected Version Ranges: < 1.3.2
Fixed in: 1.3.2
All affected versions: 0.0.1, 0.0.2, 0.1.0, 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.1.5, 0.1.6, 0.1.7, 0.2.0, 0.2.1, 0.2.2, 0.2.3, 0.2.4, 0.2.5, 0.3.0, 0.3.1, 0.3.2, 0.3.3, 0.3.4, 0.3.5, 0.3.6, 0.3.7, 0.4.0, 0.4.1, 0.4.2, 0.4.3, 1.0.0, 1.0.1, 1.1.0, 1.1.1, 1.2.0, 1.3.0, 1.3.1
All unaffected versions: 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.3.6, 1.3.7, 1.3.8, 1.3.9, 1.3.10, 1.4.0, 1.4.1, 1.4.2, 1.4.3, 1.5.0, 1.5.1, 1.5.2, 1.5.3