# GHSA-m836-gxwq-j2pm: Improper Access Control in github.com/treeverse/lakefs

> Users with limited write or read permissions can bypass access controls to read or modify unauthorized repository objects and metadata.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 28 Oct 2021
- **Also known as:** GO-2022-0375

## What is GHSA-m836-gxwq-j2pm?

GHSA-m836-gxwq-j2pm is a missing authorization vulnerability in github.com/treeverse/lakefs, published on 28 Oct 2021. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

### Impact

1. [medium] A user with write permissions to a portion of a repository may use the S3 gateway to copy any object in the repository if they know its name.
1. [medium] A user with permission to write any one of tags, branches, or commits on a repository may write all of them.
1. [low] A user with permission to read any one of tags, branches, or commits on a repository may read all of them.
1. [low] A user allowed to list objects in a repository _or_ read repository meta-data may retrieve graveler information about the location on underlying storage of all objects stored in any commit that they can view.  If the user additionally has the capability to read underlying storage, they will be able to retrieve metadata associated with all objects in that commit.

### For more information

If you have any questions or comments about this advisory please:
* Email us at security@treeverse.io.
* Open an issue on https://github.com/treeverse/lakeFS/issues/new.

## Which versions are affected by GHSA-m836-gxwq-j2pm?

3 open source packages ship an affected version, including github.com/treeverse/lakefs.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/treeverse/lakefs` | Go | All versions | 0.53.1 |
| `github.com/treeverse/lakefs` | Go | All versions | 0.53.1 |
| `github.com/treeverse/lakefs` | Go | All versions | 0.53.1 |

## How do I fix GHSA-m836-gxwq-j2pm?

Upgrade github.com/treeverse/lakefs to 0.53.1 or later.

## Is GHSA-m836-gxwq-j2pm being exploited?

There is no known exploitation of GHSA-m836-gxwq-j2pm in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-m836-gxwq-j2pm and fix it if it is affected.

What it is: GHSA-m836-gxwq-j2pm is a missing authorization vulnerability in github.com/treeverse/lakefs, published on 28 Oct 2021. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-m836-gxwq-j2pm in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/treeverse/lakefs (Go): affected all versions; fixed in 0.53.1
- github.com/treeverse/lakefs (Go): affected all versions; fixed in 0.53.1
- github.com/treeverse/lakefs (Go): affected all versions; fixed in 0.53.1

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/GHSA-m836-gxwq-j2pm/ (Markdown: https://insights.sbomify.com/GHSA-m836-gxwq-j2pm/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-m836-gxwq-j2pm

---
From sbomify Insights: https://insights.sbomify.com/GHSA-m836-gxwq-j2pm/
Summaries are generated and may contain mistakes; the official description above is the record.
