# GHSA-26hr-q2wp-rvc5: Impact When lakeFS is configured with **ALL** of the following: - Configuration option `auth.encrypt.secret_key` passed through environm

> A low-privilege user can impersonate others if lakeFS uses environment variables for encryption keys and has actions enabled.

- **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:** 12 Dec 2023
- **Also known as:** GO-2023-2397

## What is GHSA-26hr-q2wp-rvc5?

GHSA-26hr-q2wp-rvc5 is an authentication bypass vulnerability in github.com/treeverse/lakefs, published on 12 Dec 2023. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

### Impact

When lakeFS is configured with **ALL** of the following:

- Configuration option `auth.encrypt.secret_key` passed through environment variable
- Actions enabled via configuration option `actions.enabled` (default enabled)

then a user who can configure an action can impersonate any other user.

### Patches
_Has the problem been patched? What versions should users upgrade to?_

### Workarounds

**ANY ONE** of these is sufficient to prevent the issue:

* Do not pass `auth.encrypt.secret_key` through an environment variable.

   For instance, Kubernetes users can generate the entire configuration as a secret and mount that.  This is described [here](https://kubernetes.io/docs/concepts/configuration/secret/#using-a-secret).
* Disable actions.
* Limit users allowed to configure actions.

## Which versions are affected by GHSA-26hr-q2wp-rvc5?

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 | 1.3.1 |
| `github.com/treeverse/lakefs` | Go | All versions | 1.3.1 |
| `github.com/treeverse/lakefs` | Go | All versions | 1.3.1 |

## How do I fix GHSA-26hr-q2wp-rvc5?

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

## Is GHSA-26hr-q2wp-rvc5 being exploited?

There is no known exploitation of GHSA-26hr-q2wp-rvc5 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-26hr-q2wp-rvc5 and fix it if it is affected.

What it is: GHSA-26hr-q2wp-rvc5 is an authentication bypass vulnerability in github.com/treeverse/lakefs, published on 12 Dec 2023. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-26hr-q2wp-rvc5 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/treeverse/lakefs (Go): affected all versions; fixed in 1.3.1
- github.com/treeverse/lakefs (Go): affected all versions; fixed in 1.3.1
- github.com/treeverse/lakefs (Go): affected all versions; fixed in 1.3.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-26hr-q2wp-rvc5/ (Markdown: https://insights.sbomify.com/GHSA-26hr-q2wp-rvc5/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-26hr-q2wp-rvc5

---
From sbomify Insights: https://insights.sbomify.com/GHSA-26hr-q2wp-rvc5/
Summaries are generated and may contain mistakes; the official description above is the record.
