Authorization Bypass Affecting github.com/openfga/openfga/server/commands package, versions <0.3.1


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.21% (60th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Authorization Bypass vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-GOLANG-GITHUBCOMOPENFGAOPENFGASERVERCOMMANDS-3177798
  • published21 Dec 2022
  • disclosed20 Dec 2022
  • creditUnknown

Introduced: 20 Dec 2022

CVE-2022-23542  (opens in a new tab)
CWE-285  (opens in a new tab)

How to fix?

Upgrade github.com/openfga/openfga/server/commands to version 0.3.1 or higher.

Overview

Affected versions of this package are vulnerable to Authorization Bypass due to insufficient checks in the readUserTuple function.

Exploitability

Users are affected by this vulnerability if all of the following applies:

  1. User is using OpenFGA v0.3.0

  2. User created a model using modeling language v1.1 that applies a type restriction to an object e.g. define viewer: [user]

  3. User created tuples based on the aforementioned model, e.g. document:1#viewer@user:jon

  4. User updated the previous model by adding a new type and replacing the previous restriction with the newly added type e.g. define viewer: [employee]

  5. User uses the tuples created against the first model (step 3) and issue checks against the updated model e.g. user=user:jon, relation=viewer, object:document:1

CVSS Base Scores

version 3.1