Nov 16, 2026·11 min read·1 visit
An incomplete string prefix validation in qbee-agent's tar extraction routine (app/utils/tar.go) allows sibling-directory path traversal when unpacking Docker Compose build contexts. Fixed in version 2026.41 via Go's os.OpenRoot API.
CVE-2026-129237 is a partial path traversal (Zip Slip) vulnerability in qbee-agent, the device agent for the qbee.io IoT device management platform. Prior to version 2026.41, the tar archive extraction routine in app/utils/tar.go used strings.HasPrefix without enforcing a directory separator boundary. When the Docker Compose bundle configuration has UseContext enabled, an authenticated user with delegated configuration or file management privileges can supply a crafted tar archive containing sibling-prefix traversal sequences, allowing directory creation and file writes into adjacent sibling directories outside the intended extraction root.
qbee-agent is the host-level management agent for the qbee.io IoT and embedded device management platform. Written in Go (go.qbee.io/agent), the agent runs on managed Linux devices with elevated privileges to apply system configurations, manage software packages, orchestrate Docker containers, and synchronize files from the central management control plane.
One of the configuration capabilities supported by qbee-agent is the Docker Compose bundle (app/configuration/bundle_docker_compose.go). This subsystem allows administrators and delegated operators to deploy multi-container applications on target devices. When a Docker Compose configuration specifies UseContext = true, the agent downloads a tar archive containing the build context from the qbee file manager or local path and extracts it into a local cache directory prior to executing Docker Compose commands.
Prior to version 2026.41, the archive extraction routine (unpackTar in app/utils/tar.go) contained a partial path traversal vulnerability classified under CWE-22 (specifically, the sibling-prefix variant of Zip Slip). When validating that archive entries remained within the target destination directory, the function checked whether the cleaned target path began with the cleaned destination directory string using strings.HasPrefix(targetPath, destdirClean).
Because filepath.Clean strips trailing path separators and the validation logic did not append a trailing slash (filepath.Separator) to destdirClean, the check only verified string prefix equality rather than true directory containment. Consequently, an authenticated attacker with permissions to upload files and manage Docker Compose configurations can craft a tar archive containing relative traversal entries (such as ../context-outside/payload.txt) that resolve to sibling directories sharing the destination directory's name prefix. These files and directories are subsequently created on the filesystem with the privileges of the qbee-agent process.
The root cause of CVE-2026-129237 is the reliance on lexical string prefix matching (strings.HasPrefix) on normalized paths without enforcing a path separator boundary. This pattern is a well-documented anti-pattern in filesystem path validation across multiple languages (analogous to using Path.startsWith(String) instead of Path.startsWith(Path) in Java).
When unpackTar is invoked with a destination path destPath, it computes two values for every header entry inside the tar stream:
targetPath := filepath.Clean(filepath.Join(destPath, header.Name))destdirClean := filepath.Clean(destPath)In Go's path/filepath package, filepath.Clean lexical-normalizes a path, resolving . and .. segments and removing any trailing slash (unless the path is the root directory /). Therefore, if destPath is /tmp/qbee/cache/docker_compose/project-a/context/, destdirClean evaluates to /tmp/qbee/cache/docker_compose/project-a/context (without a trailing /).
When the tar archive contains an entry with header.Name set to ../context-outside/payload.txt, filepath.Join concatenates destPath and header.Name, and cleans the result. The .. segment ascends one directory level from context into project-a, resulting in targetPath evaluating to /tmp/qbee/cache/docker_compose/project-a/context-outside/payload.txt.
Next, the guard clause evaluates !strings.HasPrefix(targetPath, destdirClean). Because the character sequence /tmp/qbee/cache/docker_compose/project-a/context is an exact character-for-character prefix of /tmp/qbee/cache/docker_compose/project-a/context-outside/payload.txt, strings.HasPrefix returns true.
> [!NOTE]
> To properly validate containment using string prefixes, the check would need to ensure targetPath == destdirClean || strings.HasPrefix(targetPath, destdirClean + string(filepath.Separator)). However, even separator-aware lexical checks remain vulnerable to symlink races or TOCTOU conditions if not paired with OS-level directory descriptor scoping.
Furthermore, the original unpackTar implementation suffered from a resource management flaw inside its extraction loop. For every regular file (tar.TypeReg), defer func() { _ = targetFile.Close() }() was called directly inside the for loop body rather than within a helper function. In Go, defer statements are function-scoped rather than block-scoped, meaning file descriptors for all extracted files remained open until unpackTar returned.
Prior to version 2026.41, the vulnerable implementation in app/utils/tar.go (lines 89-109) performed path validation and file creation directly via standard os package calls:
// Vulnerable code in app/utils/tar.go (prior to 2026.41)
targetPath := filepath.Clean(filepath.Join(destPath, header.Name))
destdirClean := filepath.Clean(destPath)
// FLAW: Does not enforce a path separator after destdirClean.
// If destdirClean is "/path/to/context", a targetPath of "/path/to/context-evil/file" passes.
if !strings.HasPrefix(targetPath, destdirClean) {
return fmt.Errorf("tar entry %s is outside of destination directory %s", targetPath, destdirClean)
}
switch header.Typeflag {
case tar.TypeDir:
if err := os.MkdirAll(targetPath, 0755); err != nil {
return err
}
case tar.TypeReg:
targetFile, err := os.Create(targetPath)
if err != nil {
return err
}
// FLAW: Function-scoped defer inside a loop delays file closure until unpackTar exits.
defer func() { _ = targetFile.Close() }()
if _, err := io.Copy(targetFile, tarReader); err != nil {
return err
}
}In commit eb7875f0a849cb33325956d0b75e27061d7a7fa3 (PR #148), the maintainers remediated the issue by replacing the lexical string check with Go's os.OpenRoot API (introduced in Go 1.24 to provide traversal-resistant filesystem operations):
// Patched code in app/utils/tar.go (version 2026.41)
func unpackTar(reader io.Reader, destPath string) error {
// 1. Ensure the base destination directory exists before opening it as a Root.
if err := os.MkdirAll(destPath, 0755); err != nil {
return err
}
// 2. Open an os.Root descriptor scoped strictly to destPath.
root, err := os.OpenRoot(destPath)
if err != nil {
return err
}
defer func() { _ = root.Close() }()
tarReader := tar.NewReader(reader)
for {
header, err := tarReader.Next()
if err == io.EOF {
break
}
if err != nil {
return err
}
// 3. Clean the relative header name directly.
targetPath := filepath.Clean(header.Name)
switch header.Typeflag {
case tar.TypeDir:
// 4. Perform directory creation strictly within the os.Root boundary.
if err := root.MkdirAll(targetPath, 0755); err != nil {
return err
}
case tar.TypeReg:
// 5. Delegate file extraction to a helper function to scope defer properly.
if err := unpackTarFile(root, targetPath, tarReader); err != nil {
return err
}
}
}
return nil
}
// unpackTarFile writes a single regular file entry into the root.
func unpackTarFile(root *os.Root, targetPath string, tarReader io.Reader) error {
// root.Create rejects any path that escapes the root directory (including ".." or absolute paths).
targetFile, err := root.Create(targetPath)
if err != nil {
return err
}
defer func() { _ = targetFile.Close() }()
if _, err := io.Copy(targetFile, tarReader); err != nil {
return err
}
return nil
}The remediation in commit eb7875f0a849cb33325956d0b75e27061d7a7fa3 is complete and eliminates both lexical path traversal bypasses and symlink/TOCTOU race conditions. By leveraging *os.Root (os.OpenRoot), all subsequent filesystem calls (root.MkdirAll and root.Create) are bound to the underlying directory file descriptor. On Linux systems supporting openat2, Go's runtime enforces RESOLVE_BENEATH at the kernel syscall level. Any relative path that attempts to resolve above the root directory (..), begins with a leading slash, or traverses a symlink pointing outside the root is rejected by the OS/runtime before any inode modification occurs. Additionally, extracting unpackTarFile into a dedicated function resolves the file descriptor exhaustion risk caused by the previous in-loop defer statement.
Exploiting CVE-2026-129237 requires an attacker to deliver a malicious tar archive to a code path that invokes utils.UnpackTar. In qbee-agent, this function is reachable via the Docker Compose configuration bundle (app/configuration/bundle_docker_compose.go).
files:manage) and modify or define Docker Compose configuration bundles (configuration:manage), or compromise an upstream CI/CD pipeline with those delegated API credentials.UseContext set to true (app/configuration/compose.go:14, 26) and specify a Context archive path.When the target device checks in with the qbee control plane and processes the Docker Compose bundle (bundle_docker_compose.go:238-270), the agent downloads the specified tar archive via the file manager (app/configuration/file_manager.go:240-287) and calls utils.UnpackTar with a destination directory ending in context (for example, /var/lib/qbee/cache/docker_compose/<project>/context).
To bypass the prefix check, the attacker constructs a tar archive containing two entries:
tar.TypeDir) with Name: "../context-outside".tar.TypeReg) with Name: "../context-outside/payload.txt".note that if the parent sibling directory does not already exist on disk, the attacker must include the tar.TypeDir entry first because os.Create in the tar.TypeReg branch does not automatically create missing parent directories.
The following Go regression test from app/utils/tar_test.go demonstrates the exact construction of the sibling-prefix archive payload:
func Test_TarZipSlipSiblingPrefixBypass(t *testing.T) {
baseDir := t.TempDir()
destPath := filepath.Join(baseDir, "context")
if err := os.MkdirAll(destPath, 0755); err != nil {
t.Fatalf("failed to create destination directory: %v", err)
}
const payload = "zip-slip-sibling-prefix"
var tarBuffer bytes.Buffer
tw := tar.NewWriter(&tarBuffer)
// Step 1: Create sibling directory sharing the "context" prefix
dirHeader := &tar.Header{
Name: "../context-outside",
Mode: 0755,
Typeflag: tar.TypeDir,
}
if err := tw.WriteHeader(dirHeader); err != nil {
t.Fatalf("failed to write dir header: %v", err)
}
// Step 2: Write arbitrary file inside the newly created sibling directory
fileHeader := &tar.Header{
Name: "../context-outside/payload.txt",
Mode: 0644,
Size: int64(len(payload)),
Typeflag: tar.TypeReg,
}
if err := tw.WriteHeader(fileHeader); err != nil {
t.Fatalf("failed to write file header: %v", err)
}
if _, err := tw.Write([]byte(payload)); err != nil {
t.Fatalf("failed to write file content: %v", err)
}
if err := tw.Close(); err != nil {
t.Fatalf("failed to close tar writer: %v", err)
}
// Step 3: Trigger extraction
err := unpackTar(&tarBuffer, destPath)
// On vulnerable versions (< 2026.41), err is nil and baseDir/context-outside/payload.txt is written.
}CVE-2026-129237 carries a CVSS v3.1 base score of 5.4 (Medium) with the vector CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L. The vulnerability is constrained in scope by both the nature of the prefix check and the operational privileges required to reach the vulnerable code path.
Unlike standard Zip Slip vulnerabilities where an attacker can traverse all the way to the root filesystem (/) and overwrite arbitrary system files (such as /etc/cron.d/*, /root/.ssh/authorized_keys, or system binaries), CVE-2026-129237 is strictly a partial path traversal limited to sibling directories in the immediate parent directory that begin with the exact name of the target extraction directory.
For example, when unpacking a Docker Compose context into .../cache/docker_compose/<project>/context, the attacker can only create or overwrite files and directories matching the pattern .../cache/docker_compose/<project>/context*. They cannot traverse upward to <project>/.. or write to /etc, because any path resolving outside .../cache/docker_compose/<project>/context* fails the strings.HasPrefix check.
The practical impact depends heavily on the deployment's Role-Based Access Control (RBAC) model:
configuration:manage for specific Docker Compose bundles and files:manage to upload build contexts) without full device administrative rights, this flaw allows crossing a trust boundary. The operator can write files outside the designated context directory with the privileges of the qbee-agent daemon (typically root), potentially corrupting adjacent agent cache state or interfering with Docker Compose execution.To remediate CVE-2026-129237, operators and developers using qbee-agent should apply the vendor patch or implement administrative access controls.
Upgrade qbee-agent on all managed edge and IoT devices to version 2026.41 or later. If importing go.qbee.io/agent as a Go module dependency, update go.mod to reference commit eb7875f0a849cb33325956d0b75e27061d7a7fa3 (v0.0.0-20260908095235-eb7875f0a849) or release tag 2026.41.
In environments where fleet-wide agent upgrades require maintenance windows or staged rollouts, administrators can mitigate the risk at the control plane level without touching target devices:
configuration:manage and files:manage permissions strictly to trusted full administrators.UseContext is not required, disable UseContext and deploy pre-built container images from a container registry instead.tar -ztvf <archive> prior to upload and reject any archive containing .. path segments.CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L| Product | Affected Versions | Fixed Version |
|---|---|---|
qbee-agent qbee-io | < 2026.41 | 2026.41 |
go.qbee.io/agent qbee-io | < 0.0.0-20260908095235-eb7875f0a849 | 0.0.0-20260908095235-eb7875f0a849 |
| Attribute | Detail |
|---|---|
| CVE ID | CVE-2026-129237 (GHSA-vx32-xf7g-9ghr) |
| Vulnerability Class | CWE-22: Partial Path Traversal (Sibling-Prefix Zip Slip) |
| CVSS v3.1 Score | 5.4 Medium (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L) |
| Affected Component | qbee-agent (app/utils/tar.go & app/configuration/bundle_docker_compose.go) |
| Affected Versions | qbee-agent < 2026.41 |
| Patched Version | qbee-agent 2026.41 (commit eb7875f0a849cb33325956d0b75e27061d7a7fa3) |
| Exploit Status | Proof-of-Concept (Unit test in repository); No KEV listing |
The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.
CVE-2026-128118 (GHSA-m9j8-jcmv-hp69) is an information disclosure vulnerability affecting the SvelteKit framework (@sveltejs/kit) from version 3.0.0 through 3.1.0. A design flaw in the build-time Vite module guard plugin (plugin_guard) failed to register src/params.js as a client entry point and implemented a fail-open validation model. Consequently, server-only modules and private environment variables imported directly or dynamically within parameter matchers were compiled into publicly accessible client-side JavaScript bundles without triggering a build error.
CVE-2026-128071 is a route-rule authorization bypass and security policy circumvention vulnerability in the Nuxt web framework, affecting `nuxt`, `@nuxt/nitro-server`, and `@nuxt/vite-server` prior to version 4.6.4. Serving as an incomplete fix for GHSA-6gq8-jgmh-3ffp, the flaw arises from an interpretation conflict between Nuxt's route-rule matching logic and Vue Router's catch-all route parameter decoding. When processing an incoming HTTP request containing percent-encoded forward slashes (`%2F` or `%2f`), the route-rule evaluation engine preserves the encoded sequence as a single path segment, failing to match prefix-based rules such as `/admin/**`. However, when the request is subsequently dispatched to a catch-all page route (`app/pages/[...slug].vue`) or a multi-segment parameter handler, the parameters are URL-decoded into literal slash delimiters. This discrepancy allows unauthenticated remote attackers to bypass route-level redirects, authentication middleware (`appMiddleware`), security headers, proxy configurations, and rendering constraints (`ssr: false`, `noScripts`), while the catch-all page resolves and renders the protected resource.
In Natural Language Toolkit (NLTK) versions prior to 3.10.4, the nltk.parse.dependencygraph.dot2img function resolves the Graphviz dot binary through the system PATH using find_binary('dot') and invokes it directly via subprocess.run() instead of routing execution through nltk.pathsec.spawn_trusted(). This omission bypasses file ownership validation, directory writability checks, and dynamic loader environment scrubbing. On multi-user POSIX systems where a victim's PATH contains a directory writable by a local low-privileged attacker, the attacker can plant a malicious dot binary that executes under the victim's privileges when dependency graphs are rendered.
A race condition in Next.js versions 16.3.0 through 16.4.4 allows cross-request cache poisoning and unauthorized information disclosure across root parameters. When an application invokes the same `'use cache'` function both directly during rendering and wrapped inside `unstable_cache()`, a concurrent `unstable_cache()` request arriving during a cold start cache fill joins the in-flight execution. Because the `unstable_cache()` execution context lacks root parameter tracking, the parameter mismatch verification fails, causing `unstable_cache()` to persist root-parameter-scoped data under a global cache key.
CVE-2026-128074 is an algorithmic complexity and Regular Expression Denial of Service (ReDoS) vulnerability in Nuxt versions 4.6.0 through 4.6.3. The flaw resides in the server-side rendering (SSR) runtime components responsible for payload URL generation and experimental early 404 route evaluation. By sending unauthenticated HTTP requests containing long sequences of repeated forward slashes followed by a non-slash character, an attacker can force the V8 regular expression engine into quadratic O(N^2) backtracking, blocking the single-threaded Node.js event loop and degrading application availability.
CVE-2026-128075 (GHSA-96x6-fvhx-49hg) is an information disclosure vulnerability in the Nuxt framework affecting versions 3.0.0 prior to 4.6.4. During Server-Side Rendering (SSR), unhandled non-HTTP exceptions thrown within pages, plugins, or route middleware are automatically wrapped using createError without being flagged as unhandled. Consequently, the production SSR serializer treats these internal exceptions as deliberate public HTTP errors and embeds their raw message and data properties—which frequently contain internal URLs, API credentials, and upstream response payloads—directly into the client-accessible __NUXT_DATA__ hydration state and JSON error responses.