# CVE-2023-43645: Denial of service from circular relationship definitions in OpenFGA

> Attackers can cause denial of service in OpenFGA by triggering resource exhaustion via circular relationship definitions in authorization models.

- **Severity:** Medium 5.9 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 26 Sep 2023
- **Updated:** 23 Sep 2024
- **Also known as:** GHSA-2hm9-h873-pgqh, GO-2023-2084

## What is CVE-2023-43645?

CVE-2023-43645 is a medium-severity denial of service vulnerability in openfga, published on 26 Sep 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

OpenFGA is an authorization/permission engine built for developers and inspired by Google Zanzibar. OpenFGA is vulnerable to a denial of service 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. Users are advised to upgrade to v1.3.2 and update any offending models. There are no known workarounds for this vulnerability. Note that for models which contained cycles or a relation definition that has the relation itself in its evaluation path, checks and queries that require evaluation will no longer be evaluated on v1.3.2+ and will return errors instead. Users who do not have cyclic models are unaffected.

Weakness: CWE-835 (Loop with Unreachable Exit Condition)

## Which versions are affected by CVE-2023-43645?

3 open source packages ship an affected version, including github.com/openfga/openfga. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/openfga/openfga` | Go | All versions | 1.3.2 |
| `github.com/openfga/openfga` | Go | All versions | 1.3.2 |
| `github.com/openfga/openfga` | Go | All versions | 1.3.2 |

Products: Openfga Openfga.

## How do I fix CVE-2023-43645?

Upgrade github.com/openfga/openfga to 1.3.2 or later.

## Is CVE-2023-43645 being exploited?

There is no known exploitation of CVE-2023-43645 in the wild and no public exploit code.

## Other vulnerabilities in openfga

- [CVE-2024-31452](https://insights.sbomify.com/CVE-2024-31452/): OpenFGA Authorization Bypass (high 8.1)
- [CVE-2022-23542](https://insights.sbomify.com/CVE-2022-23542/): OpenFGA Authorization Bypass (high 7.7)
- [CVE-2024-42473](https://insights.sbomify.com/CVE-2024-42473/): OpenFGA Authorization Bypass (high 7.5)
- [CVE-2026-40293](https://insights.sbomify.com/CVE-2026-40293/): OpenFGA Playground Preshared Key Exposure (medium 6.5)
- [CVE-2023-40579](https://insights.sbomify.com/CVE-2023-40579/): OpenFGA Authorization Bypass (medium 6.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-43645 and fix it if it is affected.

What it is: CVE-2023-43645 is a medium-severity denial of service vulnerability in openfga, published on 26 Sep 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2023-43645 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/openfga/openfga (Go): affected all versions; fixed in 1.3.2
- github.com/openfga/openfga (Go): affected all versions; fixed in 1.3.2
- github.com/openfga/openfga (Go): affected all versions; fixed in 1.3.2

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2023-43645/ (Markdown: https://insights.sbomify.com/CVE-2023-43645/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2023-43645
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2023-43645
- OSV: https://osv.dev/vulnerability/CVE-2023-43645

---
From sbomify Insights: https://insights.sbomify.com/CVE-2023-43645/
Summaries are generated and may contain mistakes; the official description above is the record.
