CVE-2023-35933: Github.com/openfga/openfga Denial of Service Vulnerability
MODERATECVE-2023-35933 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 denial of service due to circular relationship. Remediation is available by upgrading affected packages to version 1.1.1.
CVE-2023-35933 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-35933
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.1.1
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-35933, 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.1.1), 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-35933 Affected Github.com/openfga/openfga Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/openfga/openfga
|
Go |
< 1.1.1
|
1.1.1
|
References
Frequently Asked Questions
What is CVE-2023-35933?
Which Github.com/openfga/openfga versions are affected?
What version fixes CVE-2023-35933?
Is github.com/openfga/openfga affected?
What is the CVSS score of CVE-2023-35933?
What CWE is associated with CVE-2023-35933?
How can I check Go dependencies for CVE-2023-35933?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-hr9r-8phq-5x8j",
"modified" : "2023-07-03T18:39:26Z",
"published" : "2023-06-28T22:49:49Z",
"aliases" : [ "CVE-2023-35933" ],
"summary" : "OpenFGA vulnerable to denial of service due to circular relationship",
"details" : "### Overview\n\nOpenFGA versions v1.1.0 and prior are vulnerable to a DoS attack when certain Check and ListObjects calls are executed against authorization models that contain circular relationship definitions.\n\n### Am I Affected?\n\nYou are affected by this vulnerability if you are using OpenFGA v1.1.0 or earlier, and if you are executing certain [Check](https://openfga.dev/api/service#/Relationship%20Queries/Check) or [ListObjects](https://openfga.dev/api/service#/Relationship%20Queries/ListObjects) calls against a vulnerable authorization model. To see which of your models could be vulnerable to this attack, download OpenFGA v1.2.0 and run the following command: \n\n```\n./openfga validate-models --datastore-engine <ENGINE> --datastore-uri <URI> | jq .[] | select(.Error | contains(\"loop\"))\n```\n\nreplacing the variables `<ENGINE>` and `<URI>` as needed.\n\n### Fix\n\nUpgrade to v1.1.1.\n\n### Backward Compatibility\n\nIf you are not passing an invalid authorization model (as identified by running `./openfga validate-models`) as a parameter of your Check and ListObjects calls, this upgrade is backwards compatible. \n\nOtherwise, OpenFGA v1.1.1 will start returning HTTP 400 status codes on those calls.",
"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.1.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/openfga/openfga/security/advisories/GHSA-hr9r-8phq-5x8j"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-35933"
}, {
"type" : "WEB",
"url" : "https://github.com/openfga/openfga/commit/087ce392595f3c319ab3028b5089118ea4063452"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/openfga/openfga"
}, {
"type" : "WEB",
"url" : "https://openfga.dev/api/service#/Relationship%20Queries/Check"
}, {
"type" : "WEB",
"url" : "https://openfga.dev/api/service#/Relationship%20Queries/ListObjects"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-835" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-06-28T22:49:49Z",
"nvd_published_at" : "2023-06-26T20:15:10Z"
}
}