Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/openfga/openfga
  4. ›
  5. CVE-2024-42473

CVE-2024-42473: OpenFGA Authorization Bypass

August 9, 2024

Overview

OpenFGA v1.5.7 and v1.5.8 are vulnerable to authorization bypass when calling Check API with a model that uses but not and from expressions and a userset.

For example, with a model like the following

 model
    schema 1.1

  type user

  type role
    relations
      define assignee: [user]

  type permission
    relations
      define assignee: assignee from role
      define role: [role]

  type job
    relations
      define can_read: [permission#assignee]
      define problem: [user] but not can_read

and these tuples:

user:1, problem, job:1
user:1, assignee, role:admin
role:admin, role, permission:readJobs
permission:readJobs#assignee, can_read, job:1

A query such as Check(object=job:1, relation=problem, user=user:1) will return allowed=true when the correct response is allowed=false.

Fix

Downgrade to v1.5.6 as soon as possible. This downgrade is backward compatible.

We are currently working on a fix which will be included in the next release.

References

  • github.com/advisories/GHSA-3f6g-m4hr-59h8
  • github.com/openfga/openfga
  • github.com/openfga/openfga/security/advisories/GHSA-3f6g-m4hr-59h8
  • nvd.nist.gov/vuln/detail/CVE-2024-42473

Code Behaviors & Features

Detect and mitigate CVE-2024-42473 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 1.5.7 up to 1.5.8

Solution

Unfortunately, there is no solution available yet.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

Learn more about CVSS

Weakness

  • CWE-285: Improper Authorization

Source file

go/github.com/openfga/openfga/CVE-2024-42473.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:59 +0000.