upatch.dev

CVE-2026-92791

Uber Kraken through 0.1.29 Path Traversal via tag parameter

Refuses file access outside the kraken-testfs storage directory to mitigate CVE-2026-92791.

High 8.7Vetted

EPSS 0.6%: the estimated chance this CVE is exploited in the next 30 days, as of 24 Nov 2026.

At a glance

CVE-2026-92791 is a high (CVSS 8.7) vulnerability in Kraken, published 16 September 2026. A vetted upatch, cve-2026-92791-testfs-block, blocks it on running Linux machines with shirudo until Kraken is upgraded.

Severity
High 8.7 CVSS 4.0
Chance of exploitation
0.6% in the next 30 days (EPSS, 24 Nov 2026)
Known exploited
No, not on CISA’s KEV list
Weakness
CWE-22
Affected software
Kraken (uber)
Upatch status
Vetted, merged into the registry
How to apply
Build, sign and roll out with shirudo

Overview

CVE-2026-92791, published on 16 September 2026, is an unauthenticated path traversal in Uber Kraken through 0.1.29 (and 0.1.30, fixed in 0.1.31). Kraken's build-index component exposes GET /tags/{tag} and HEAD /tags/{tag} (build-index/tagserver/server.go), which decode the tag URL parameter with httputil.ParseParam (url.PathUnescape) and pass it to namepath.DockerTagPather.BlobPath (lib/backend/namepath/pather.go). BlobPath splits the string on : into repo and tag and joins path.Join(p.BasePath(), repo, "_manifests/tags", tag, "current/link") without checking for .. or /. When backed by Kraken's testfs storage server (lib/backend/testfs/server.go), s.path(entry) replaces : with / and runs filepath.Join(s.dir, entry) without verifying that the resolved path stays inside s.dir (/tmp/kraken-testfs*). A tag parameter with percent-encoded ../ segments such as ..%2f..%2f..%2f..%2f..%2f..%3aevil-tag walks out of the storage root and lets an unauthenticated caller stat arbitrary files via HEAD /tags/{tag} (os.Stat in statHandler) or read files via GET /tags/{tag} (os.Open in downloadHandler).

Official description

Uber Kraken through 0.1.29 fails to validate the tag parameter in the /tags/{tag} endpoint, allowing unauthenticated attackers to traverse outside the configured storage root. Attackers can use percent-encoded parent-directory segments in the tag parameter to read arbitrary files accessible to the testfs backend process.

Affected versions

Uber Kraken:

Component Affected Fixed in
uber/kraken through 0.1.30 (advisory states through 0.1.29) 0.1.31

Sources

More references from NVD (6)

Mitigation

Two BPF LSM programs match processes whose executable is testfs or kraken-testfs:

Hook Refused
lsm/file_open Opening a regular file whose dentry has no /tmp/kraken-testfs* ancestor within 16 directory levels
lsm/inode_getattr Statting a path whose dentry has no /tmp/kraken-testfs* ancestor within 16 directory levels

testfs.NewServer() creates its storage directory with os.MkdirTemp("/tmp", "kraken-testfs"), and every file stored in the backend lives under /tmp/kraken-testfs*/. When filepath.Join(s.dir, entry) resolves .. segments outside s.dir, the kernel resolves the path outside /tmp/kraken-testfs*, so the resulting dentry has no kraken-testfs* ancestor and the upatch returns -EPERM. A refusal from an earlier BPF LSM program on the same hook is preserved.

The refused per-CPU array counts refusals at key 0.

Side effects

  • testfs (kraken-testfs) cannot stat or open regular files outside its /tmp/kraken-testfs* directory after starting.
  • Normal tag uploads, stats (HEAD /tags/{tag}), downloads (GET /tags/{tag}) and listings within /tmp/kraken-testfs* continue to work.
  • All other processes on the machine are unaffected.

Preemption model and cost

The programs keep no shared state other than the per-CPU refused counter updated with __sync_fetch_and_add, making them safe under every preemption model including preemptible RCU and PREEMPT_RT. Every file_open and inode_getattr call checks the current task's executable dentry length and name first and returns immediately for every process other than testfs or kraken-testfs.

The policy

134 lines of BPF C, attached at lsm/file_open and lsm/inode_getattr.

// SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause

#include "vmlinux.h"
#include <bpf/bpf_helpers.h>
#include <bpf/bpf_tracing.h>
#include <bpf/bpf_core_read.h>

#define EPERM 1

char _license[] SEC("license") = "Dual BSD/GPL";

struct {
	__uint(type, BPF_MAP_TYPE_PERCPU_ARRAY);
	__uint(max_entries, 1);
	__type(key, __u32);
	__type(value, __u64);
} refused SEC(".maps");

static __always_inline void count_refused(void)
{
	__u32 key = 0;
	__u64 *value = bpf_map_lookup_elem(&refused, &key);

	if (value)
		__sync_fetch_and_add(value, 1);
}

static __always_inline bool is_testfs_exe(void)
{
	struct task_struct *task = bpf_get_current_task_btf();
	const struct dentry *exe = BPF_CORE_READ(task, mm, exe_file, f_path.dentry);
	const unsigned char *name = BPF_CORE_READ(exe, d_name.name);
	__u32 len = BPF_CORE_READ(exe, d_name.len);
	char buf[16] = {};

	if (!exe || !name)
		return false;
	if (len == 6) {
		if (bpf_probe_read_kernel(buf, 6, name))
			return false;
		return buf[0] == 't' && buf[1] == 'e' && buf[2] == 's' &&
		       buf[3] == 't' && buf[4] == 'f' && buf[5] == 's';
	}
	if (len == 13) {
		if (bpf_probe_read_kernel(buf, 13, name))
			return false;
		return buf[0] == 'k' && buf[1] == 'r' && buf[2] == 'a' &&
		       buf[3] == 'k' && buf[4] == 'e' && buf[5] == 'n' &&
		       buf[6] == '-' && buf[7] == 't' && buf[8] == 'e' &&
		       buf[9] == 's' && buf[10] == 't' && buf[11] == 'f' &&
		       buf[12] == 's';
	}
	return false;
}

static __always_inline bool dentry_is_kraken_testfs_dir(const struct dentry *d)
{
	const unsigned char *name = BPF_CORE_READ(d, d_name.name);
	__u32 len = BPF_CORE_READ(d, d_name.len);
	char buf[13] = {};

	if (!d || !name || len < 13)
		return false;
	if (bpf_probe_read_kernel(buf, 13, name))
		return false;
	return buf[0] == 'k' && buf[1] == 'r' && buf[2] == 'a' &&
	       buf[3] == 'k' && buf[4] == 'e' && buf[5] == 'n' &&
	       buf[6] == '-' && buf[7] == 't' && buf[8] == 'e' &&
	       buf[9] == 's' && buf[10] == 't' && buf[11] == 'f' &&
	       buf[12] == 's';
}

static __always_inline bool under_kraken_testfs_root(const struct dentry *dentry)
{
	const struct dentry *cur = dentry;

	for (int i = 0; i < 16; i++) {
		const struct dentry *parent;

		if (!cur)
			return false;
		if (dentry_is_kraken_testfs_dir(cur))
			return true;
		parent = BPF_CORE_READ(cur, d_parent);
		if (parent == cur)
			break;
		cur = parent;
	}
	return false;
}

static __always_inline int earlier_verdict(int ret)
{
	return ret >= -4095 && ret < 0 ? ret : -EPERM;
}

SEC("lsm/file_open")
int BPF_PROG(cve_2026_92791_open, struct file *file, int ret)
{
	const struct dentry *dentry;
	struct inode *inode;
	umode_t mode;

	if (ret)
		return earlier_verdict(ret);
	if (!is_testfs_exe())
		return 0;
	inode = BPF_CORE_READ(file, f_inode);
	mode = BPF_CORE_READ(inode, i_mode);
	if ((mode & 0170000) != 0100000)
		return 0;
	dentry = BPF_CORE_READ(file, f_path.dentry);
	if (under_kraken_testfs_root(dentry))
		return 0;
	count_refused();
	return -EPERM;
}

SEC("lsm/inode_getattr")
int BPF_PROG(cve_2026_92791_getattr, const struct path *path, int ret)
{
	const struct dentry *dentry;

	if (ret)
		return earlier_verdict(ret);
	if (!is_testfs_exe())
		return 0;
	dentry = BPF_CORE_READ(path, dentry);
	if (under_kraken_testfs_root(dentry))
		return 0;
	count_refused();
	return -EPERM;
}

Process

How this upatch was written, checked and reviewed, from the registry’s history.

  1. 16 Sept 2026CVECVE published
  2. 25 Nov 2026Pull requestPull request #59 openedAdd CVE-2026-92791: Refuses file access outside the kraken-testfs storage directoryromanlab
  3. 25 Nov 2026CIUpdate upatch.devpassed
  4. 25 Nov 2026CICIpassed
  5. 25 Nov 2026MergeMerged #59romanlab

No human review is recorded on GitHub for this upatch yet.

Evidence

On Uber Kraken v0.1.29 backed by testfs, the loaded upatch refused the path-traversal read outside the /tmp/kraken-testfs* storage root while normal tag resolution inside the storage root kept working.

Tested
25 Nov 2026
Target
Uber Kraken v0.1.29 build-index tagserver and kraken-testfs backend on loopback
Kernel
7.4-shirudo-ci-20261123
Architecture
x86_64
Distribution
Ubuntu 26.04
Results
StateTraversal GET /tags/{tag} outside testfs rootNormal GET /tags/library%2Falpine%3Alatest
Before loadingHTTP 200 (probe digest returned)HTTP 200
Upatch loadedHTTP 404 (open refused with EPERM)HTTP 200
After unloadingHTTP 200 (probe digest returned)HTTP 200
tools-test.log Output of tools/test --setup before, while and after loading the upatch on the shirudo test VM.
tools/test --setup, 2026-11-25T13:35:02Z
Target: shirudo test VM, Linux 7.4-shirudo-ci-20261123, x86_64, swtpm
cve-2026-92791
  setup   done         KRAKEN_TAGSERVER_URL=http://127.0.0.1:15004 KRAKEN_PROBE_DIGEST=sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  before  reached      GET /tags/{tag} traversed outside the testfs storage root and returned the probe digest (HTTP 200)
  loaded  blocked      GET /tags/{tag} returned HTTP 404 for the path outside the testfs storage root while normal tag lookup returned HTTP 200
  after   reached      GET /tags/{tag} traversed outside the testfs storage root and returned the probe digest (HTTP 200)
  PASS: reached before, blocked while loaded, reached again after

Use it

Build the upatch from source, sign it with your own shirudo key, and publish it to your own OCI registry. Machines that follow your upatch tree load it within about a minute.

Build and sign
git clone https://github.com/copper-helm/upatch-registry
cd upatch-registry
tools/build <shirudo-checkout> <keys-dir> 1.0.0 upatches/cve-2026-92791
Publish and roll out
shirudo bpm push build/packages/cve-2026-92791-1.0.0.bee oci://<registry>/<namespace>/cve-2026-92791 --keys-dir <keys-dir>
shirudo bpm tree append build/packages/cve-2026-92791-1.0.0.bee oci://<registry>/<namespace>/<tree> --tree-id <tree-id> --keys-dir <keys-dir>