CVE-2023-43645: Github.com/openfga/openfga Denial of Service Vulnerability
MODERATECVE-2023-43645 is a MODERATE (CVSS 5.9) denial of service vulnerability (CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')) affecting Github.com/openfga/openfga libraries in the Go ecosystem. The issue involves openfga vulnerable to dos from circular relationship definitions. Remediation is available by upgrading affected packages to version 1.3.2.
CVE-2023-43645 at a Glance
Security Impact
CVSS: 5.9
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2023-43645
To remediate this vulnerability, upgrade all affected Github.com/openfga/openfga dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/openfga/openfga to 1.3.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/openfga/openfga
How to Check if You Are Affected
To determine whether your application is affected by CVE-2023-43645, inspect your project dependencies for Github.com/openfga/openfga:
inspect dependencies for github.com/openfga/openfga
Analyze the terminal output to locate any version of Github.com/openfga/openfga in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.3.2), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop'), where the product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop. In Github.com/openfga/openfga, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2023-43645 Affected Github.com/openfga/openfga Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/openfga/openfga
|
Go |
< 1.3.2
|
1.3.2
|
References
Frequently Asked Questions
What is CVE-2023-43645?
Which Github.com/openfga/openfga versions are affected?
What version fixes CVE-2023-43645?
Is github.com/openfga/openfga affected?
What is the CVSS score of CVE-2023-43645?
What CWE is associated with CVE-2023-43645?
How can I check Go dependencies for CVE-2023-43645?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-2hm9-h873-pgqh",
"modified" : "2023-09-28T21:27:04Z",
"published" : "2023-09-28T21:27:04Z",
"aliases" : [ "CVE-2023-43645" ],
"summary" : "OpenFGA Vulnerable to DoS from circular relationship definitions",
"details" : "## Overview\nOpenFGA 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.\n\n## Am I Affected?\nYes, if your store contains an authorization model that allows circular relationships. For example, with this model:\n\n```\nmodel\n schema 1.1\n\ntype user\n\ntype group\n relations\n define memberA: [user] or memberB or memberC or memberD or memberE\n define memberB: [user] or memberA or memberC or memberD or memberE\n define memberC: [user] or memberA or memberB or memberD or memberE\n define memberD: [user] or memberA or memberB or memberC or memberE\n define memberE: [user] or memberA or memberB or memberC or memberD\n```\n\nThis Check: `(user:anne, memberA, group:X)` can exhaust memory in the server.\n\n## Fix\nUpgrade to v1.3.2 and update any offending models.\n\n **[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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/openfga/openfga"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.3.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/openfga/openfga/security/advisories/GHSA-2hm9-h873-pgqh"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-43645"
}, {
"type" : "WEB",
"url" : "https://github.com/openfga/openfga/commit/725296025fd81227c89525808652c6acd4a605f6"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/openfga/openfga"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-835" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-09-28T21:27:04Z",
"nvd_published_at" : "2023-09-27T15:19:34Z"
}
}