github.com/treeverse/lakefs
Affected
- introduced
0, fixed1.77.0(semver)
Fixed versions
1.77.0
Fix
- Fixed version
1.77.0go get github.com/treeverse/[email protected]
Advisory
Also known as: CVE-2026-26187, GO-2026-4494
lakeFS vulnerable to path traversal in local block adapter allow cross-namespace and sibling directory access
Summary
Two path traversal vulnerabilities in the local block adapter allow authenticated users to read and write files outside their designated storage boundaries.
Details
The local block adapter in pkg/block/local/adapter.go had two path traversal vulnerabilities:
1. Prefix Bypass Vulnerability
The verifyRelPath function used strings.HasPrefix() to verify that requested paths fall within the configured storage directory. This check was insufficient because it validated only the path prefix without requiring a path separator, allowing access to sibling directories with similar names.
Example: If the adapter is configured with base path /data/lakefs:
| Path | Expected | Actual |
|------|----------|--------|
| /data/lakefs/valid/file.txt | Allowed | Allowed |
| /data/lakefs_evil/secret.txt | Blocked | Vulnerable |
| /data/lakefs_backup/data.db | Blocked | Vulnerable |
2. Namespace Escape via Identifier
The adapter verified that resolved paths stayed within the adapter's base path, but did not verify that object identifiers stayed within their designated storage namespace. This allowed attackers to use path traversal sequences in the object identifier to access files in other namespaces.
Example: With base path /data/lakefs and namespace local://repo1/userdata:
| Identifier | Resolved Path | Expected | Actual |
|------------|---------------|----------|--------|
| file.txt | /data/lakefs/repo1/userdata/file.txt | Allowed | Allowed |
| ../secrets/key.txt | /data/lakefs/repo1/secrets/key.txt | Blocked | Vulnerable |
| ../../other-repo/data.txt | /data/lakefs/other-repo/data.txt | Blocked | Vulnerable |
This vulnerability allows users with access to one namespace to read and write files in other namespaces within the same lakeFS deployment.
Impact
Authenticated lakeFS users can:
This could allow attackers to:
This vulnerability only affects deployments using the local block adapter. Deployments using S3, GCS, Azure, or other object storage backends are not affected.
Patches
Fixed in version v1.77.0.
The fixes:
Workarounds
Credit
Discovered via CodeQL static analysis.
High Basis: The source's own band: HIGH
0, fixed 1.77.0 (semver)1.77.0
1.77.0go get github.com/treeverse/[email protected]Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0