Dev.to Security πŸ” Cybersecurity πŸ‘ 0 πŸ“– 3 min read

CVE-2026-129237: CVE-2026-129237: Partial Path Traversal (Zip Slip) in qbee-agent Tar Extractor

CVE-2026-129237: Partial Path Traversal (Zip Slip) in qbee-agent Tar Extractor Vulnerability ID: CVE-2026-129237 CVSS Score: 5.4 Published: 2026-11-16 CVE-2026-129237 is a partial path traversal (Zip Slip) vulnerabi

CVE-2026-129237: Partial Path Traversal (Zip Slip) in qbee-agent Tar Extractor

Vulnerability ID: CVE-2026-129237
CVSS Score: 5.4
Published: 2026-11-16

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.

TL;DR

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.

⚠️ Exploit Status: POC

Technical Details

  • 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

Affected Systems

  • qbee-agent (< 2026.41)
  • go.qbee.io/agent (< 0.0.0-20260908095235-eb7875f0a849)
  • qbee-agent: < 2026.41 (Fixed in: 2026.41)
  • go.qbee.io/agent: < 0.0.0-20260908095235-eb7875f0a849 (Fixed in: 0.0.0-20260908095235-eb7875f0a849)

Code Analysis

Commit: eb7875f

Fix: Docker Compose build context Zip Slip writes outside context directory (#148)

--- a/app/utils/tar.go
+++ b/app/utils/tar.go
@@ -75,6 +75,16 @@ func GetTarExtension(tarPath string) string {

 // unpackTar unpacks a tar archive to a destination directory.
 func unpackTar(reader io.Reader, destPath string) error {
+   if err := os.MkdirAll(destPath, 0755); err != nil {
+       return err
+   }
+
+   root, err := os.OpenRoot(destPath)
+   if err != nil {
+       return err
+   }
+   defer func() { _ = root.Close() }()
+
    tarReader := tar.NewReader(reader)

    for {
@@ -86,29 +96,33 @@ func unpackTar(reader io.Reader, destPath string) error {
            return err
        }

-       targetPath := filepath.Clean(filepath.Join(destPath, header.Name))
-       destdirClean := filepath.Clean(destPath)
-
-       if !strings.HasPrefix(targetPath, destdirClean) {
-           return fmt.Errorf("tar entry %s is outside of destination directory %s", targetPath, destdirClean)
-       }
+       targetPath := filepath.Clean(header.Name)

        switch header.Typeflag {
        case tar.TypeDir:
-           if err := os.MkdirAll(targetPath, 0755); err != nil {
+           if err := root.MkdirAll(targetPath, 0755); err != nil {
                return err
            }
        case tar.TypeReg:
-           targetFile, err := os.Create(targetPath)
-           if err != nil {
-               return err
-           }
-           defer func() { _ = targetFile.Close() }()
-
-           if _, err := io.Copy(targetFile, tarReader); err != nil {
+           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 {
+   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
+}

Exploit Details

  • GitHub: Unit and regression tests (Test_TarZipSlipSiblingPrefixBypass and Test_ComposeContextRejectsSiblingPrefixZipSlip) included in the official fix commit demonstrating the sibling-prefix bypass.

Mitigation Strategies

  • Upgrade qbee-agent to version 2026.41 or newer across all managed devices.
  • Restrict qbee.io RBAC permissions (configuration:manage and files:manage) to fully trusted fleet administrators.
  • Disable UseContext in Docker Compose configuration bundles and use pre-built container images instead of on-device build contexts.

Remediation Steps:

  1. Identify all devices running qbee-agent versions prior to 2026.41.
  2. Deploy qbee-agent package version 2026.41 (incorporating commit eb7875f0a849cb33325956d0b75e27061d7a7fa3) via your system package manager or qbee software management.
  3. If using go.qbee.io/agent as a Go library, run 'go get go.qbee.io/[email protected]' and rebuild dependent binaries.
  4. Audit Docker Compose cache directories on managed hosts for unexpected 'context-*' sibling directories.

References

Read the full report for CVE-2026-129237 on our website for more details including interactive diagrams and full exploit analysis.

πŸ“° Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.