Improper Access Control Affecting github.com/treeverse/lakefs/pkg/api package, versions >=0.90.0 <1.12.1


Severity

Recommended
0.0
medium
0
10

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

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 Improper Access Control vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-GOLANG-GITHUBCOMTREEVERSELAKEFSPKGAPI-6291716
  • published28 Feb 2024
  • disclosed22 Feb 2024
  • creditAriel Shaqed

Introduced: 22 Feb 2024

CVE NOT AVAILABLE CWE-284  (opens in a new tab)

How to fix?

Upgrade github.com/treeverse/lakefs/pkg/api to version 1.12.1 or higher.

Overview

Affected versions of this package are vulnerable to Improper Access Control due to a bug in permissions validation, a user with the ci:ReadAction permission can bypass read checks when copying an object. If they also have read and write permission to a path in the repository, they can copy an otherwise unreadable object and read it.

Notes:

In order to be affected and exploitable, the following conditions must ALL occur on the same user:

  1. ci:ReadAction enabled for the repository. Predefined policies RepoManagementRead and RepoManagementFullAccess allow this action.

  2. fs:ReadObject and fs:WriteObject enabled for some path.

  3. fs:ReadObject not available for some path

Many installations are unaffected:

  1. Installations using ACLs are not affected. This includes all OSS installations that have not implemented an external authorization server. We do not know of any OSS installations that have implemented such a server. ACLs that allow ci:ReadAction also allow reading repositories, so no capabilities are granted.

  2. Installations using RBAC that use only predefined policies with "all" ARNs ("*") are not affected. This includes all installations that have not defined any new groups in RBAC.

In order to be affected, installations using RBAC must define users and simultaneous allow ci:ReadAction and disallow fs:ReadObject for some path. ci:ReadAction is available in policies RepoManagementReadAll and RepoManagementFullAccess. By default these actions are configured for groups Developers and above, for all repositories and paths.

Workaround

Use RBAC to deny ci:* permissions to all users, or to all users who have limited read access.

References

CVSS Scores

version 3.1