{"id":"CVE-2026-129237","aliases":["CVE-2026-129237","GHSA-vx32-xf7g-9ghr","GO-2026-6987"],"related":[],"kind":"vulnerability","state":"published","title":"qbee-agent: Docker Compose build context Zip Slip writes outside context directory","summary":"qbee-agent is the device agent component of the qbee.io IoT device management platform. Prior to 2026.41, the unpackTar extraction logic in app/utils/tar.go validates cleaned archive entry paths with strings.HasPrefix(targetPath, destdirClean) without enforcing a path-separator boundary. When UseContext enables the Docker Compose build context path in app/configuration/bundle_docker_compose.go, a less-privileged archive supplier with delegated configuration and/or file-manager access can provide a sibling-prefix traversal entry that passes the check, causing utils.UnpackTar to create directories and regular files outside the intended context extraction directory with qbee-agent process privileges, despite the supplier lacking authority to write those sibling files. In deployments where only full device or fleet administrators can provide Docker Compose context archives, this behavior is hardening rather than a crossed security boundary. The demonstrated impact is limited to nearby cache or project paths sharing the destination prefix, may affect integrity or availability of qbee-agent-managed Docker Compose state, and does not establish arbitrary absolute-path writes or direct code execution. This issue is fixed in version 2026.41.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"qbee-agent is the device agent component of the qbee.io IoT device management platform. Prior to 2026.41, the unpackTar extraction logic in app/utils/tar.go validates cleaned archive entry paths with strings.HasPrefix(targetPath, destdirClean) without enforcing a path-separator boundary. When UseContext enables the Docker Compose build context path in app/configuration/bundle_docker_compose.go, a less-privileged archive supplier with delegated configuration and/or file-manager access can provide a sibling-prefix traversal entry that passes the check, causing utils.UnpackTar to create directories and regular files outside the intended context extraction directory with qbee-agent process privileges, despite the supplier lacking authority to write those sibling files. In deployments where only full device or fleet administrators can provide Docker Compose context archives, this behavior is hardening rather than a crossed security boundary. The demonstrated impact is limited to nearby cache or project paths sharing the destination prefix, may affect integrity or availability of qbee-agent-managed Docker Compose state, and does not establish arbitrary absolute-path writes or direct code execution. This issue is fixed in version 2026.41.","source":"cvelist"},{"lang":"en","text":"## Summary\n\n`qbee-agent` contains a Zip Slip vulnerability in `app/utils/tar.go`. The tar extractor checks whether an entry remains inside the destination directory with:\n\n```go\nstrings.HasPrefix(targetPath, destdirClean)\n```\n\nThis does not enforce a path separator boundary. If the destination directory is `/tmp/.../context`, a tar entry such as `../context-outside/payload.txt` cleans to `/tmp/.../context-outside/payload.txt` and still passes the prefix check. qbee-agent then creates the outside directory and writes the payload outside the intended extraction root.\n\nThe issue is reachable through the Docker Compose build context path when `UseContext` is enabled.\n\n## Details\n\nCode references below were verified against `qbee-io/qbee-agent` commit:\n\n- `1d8bdbb7422adb4ca563d3114cbe2817d6ba3581`\n\nAffected repository:\n\n- `qbee-io/qbee-agent`\n\nAffected files:\n\n- `app/utils/tar.go`\n- Docker Compose context path in `app/configuration/bundle_docker_compose.go`\n\nThe vulnerable extraction code:\n\n- `app/utils/tar.go:89-93`\n\n```go\ntargetPath := filepath.Clean(filepath.Join(destPath, header.Name))\ndestdirClean := filepath.Clean(destPath)\n\nif !strings.HasPrefix(targetPath, destdirClean) {\n    return fmt.Errorf(\"tar entry %s is outside of destination directory %s\", targetPath, destdirClean)\n}\n```\n\nThe file is then created at the accepted `targetPath`:\n\n- `app/utils/tar.go:96-109`\n\n```go\ncase tar.TypeDir:\n    if err := os.MkdirAll(targetPath, 0755); err != nil {\n        return err\n    }\ncase tar.TypeReg:\n    targetFile, err := os.Create(targetPath)\n```\n\nDocker Compose build contexts reach this extractor:\n\n- `app/configuration/bundle_docker_compose.go:238-270`\n\nThe context archive is downloaded and then unpacked into the compose project context directory with `utils.UnpackTar`.\n\nArchive source and role evidence:\n\n- `app/configuration/compose.go:14` defines the Docker Compose build context as the remote configuration field `Context string`.\n- `app/configuration/compose.go:26` enables this path with `UseContext`.\n- `app/configuration/file_manager.go:240-246` and `app/configuration/file_manager.go:281-287` show that context sources are resolved either from `file://` local files or from the Qbee file-manager API.\n- Qbee's Docker Compose documentation lists \"Build Context\" as a Docker Compose configuration option: https://docs.qbee.io/configuration-docker-compose.html\n- Qbee's RBAC documentation separates `configuration:manage` from `files:manage`, and maps \"Configure -> Modify configuration\" to `configuration:manage` while \"Files manager -> Write access\" maps to `files:manage`: https://docs.qbee.io/account-users-and-roles.html\n- Qbee's CI/CD documentation describes using a dedicated Qbee user with a role restricted to configuration changes to push and commit deployment configuration: https://docs.qbee.io/tutorial-iot-container-deployment-with-ci-cd-devops.html\n\nTrust-boundary requirement:\n\n- The vulnerable primitive is clear: qbee-agent writes a regular file outside the intended context extraction directory.\n- The security boundary is present when the archive supplier is less privileged than the local qbee-agent process and is not supposed to write arbitrary sibling files in qbee-agent's Docker Compose cache/project area.\n- The public code and documentation support this boundary for tenants that delegate configuration and/or file-manager access to limited users or CI automation.\n- If a deployment allows only full device/fleet administrators to provide Docker Compose context archives, the finding should be treated as hardening for that deployment.\n\n## PoC\n\nTwo failing regression tests add.\n\nThe utility-level test proves the extractor bug directly:\n\n- `app/utils/tar_test.go:132`\n- `Test_TarZipSlipSiblingPrefixBypass`\n\nCommand:\n\n```sh\nwsl -e sh -lc 'cd /mnt/c/Users/kwak0/Documents/Qbee/targets/qbee-agent; /mnt/c/Users/kwak0/Documents/Qbee/.tools/go1.26.4-linux/go/bin/go test ./app/utils -run Test_TarZipSlipSiblingPrefixBypass -count=1 -v'\n```\n\nObserved result:\n\n```text\n=== RUN   Test_TarZipSlipSiblingPrefixBypass\n    tar_test.go:169: expected unpackTar to reject sibling-prefix traversal archive\n    tar_test.go:174: path traversal: payload was written outside destPath at /tmp/.../context-outside/payload.txt; got \"zip-slip-sibling-prefix\"\n--- FAIL: Test_TarZipSlipSiblingPrefixBypass (0.00s)\nFAIL\n```\n\nThe Docker Compose bundle-path test proves reachability through `Compose.getContext()`:\n\n- `app/configuration/bundle_docker_compose_context_zip_slip_test.go:13`\n- `Test_ComposeContextRejectsSiblingPrefixZipSlip`\n\nCommand:\n\n```sh\nwsl -e sh -lc 'cd /mnt/c/Users/kwak0/Documents/Qbee/targets/qbee-agent; /mnt/c/Users/kwak0/Documents/Qbee/.tools/go1.26.4-linux/go/bin/go test ./app/configuration -run Test_ComposeContextRejectsSiblingPrefixZipSlip -count=1 -v'\n```\n\nObserved result:\n\n```text\n=== RUN   Test_ComposeContextRejectsSiblingPrefixZipSlip\n    bundle_docker_compose_context_zip_slip_test.go:66: expected compose context unpack to reject sibling-prefix traversal archive\n    bundle_docker_compose_context_zip_slip_test.go:75: compose context path traversal wrote outside context dir at /tmp/.../cache/docker_compose/project-a/context-outside/payload.txt; got \"compose-context-zip-slip\"\n--- FAIL: Test_ComposeContextRejectsSiblingPrefixZipSlip (0.00s)\nFAIL\n```\n\n## Impact\n\nAn attacker-controlled Docker Compose build context archive can create directories and regular files outside qbee-agent's intended context extraction directory, with qbee-agent process privileges.\n\nThe demonstrated impact is constrained path traversal:\n\n- It can write sibling-prefix paths such as `cache/docker_compose/<project>/context-outside/payload.txt`.\n- It does not demonstrate writing arbitrary paths such as `/etc/passwd`; those do not pass the current string-prefix check.\n- It can corrupt or alter files in nearby qbee-agent Docker Compose cache/project paths if their cleaned path shares the destination prefix.\n- It may affect integrity or availability of qbee-agent-managed Docker Compose state, depending on the project/cache layout.\n\nThis report does not claim direct RCE.","format":"markdown","source":"ghsa"},{"lang":"en","text":"qbee-agent: Docker Compose build context Zip Slip writes outside context directory in go.qbee.io/agent","format":"markdown","source":"go"}],"published":"2026-11-16T16:52:38.767Z","modified":"2026-11-23T20:41:23.910Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L","score":5.4,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L","score":5.4,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L","score":5.4,"rating":"MEDIUM"}],"cwes":["CWE-22"],"affected":[{"ranges":[{"version":"< 2026.41","status":"affected"}],"vendor":"qbee-io","product":"qbee-agent","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.0.0-20260908095235-eb7875f0a849"}],"ecosystem":"Go","package":"go.qbee.io/agent","purl":"pkg:golang/go.qbee.io/agent","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.0.0-20260908095235-eb7875f0a849"}],"ecosystem":"Go","package":"go.qbee.io/agent","purl":"pkg:golang/go.qbee.io/agent","source":"go"}],"references":[{"url":"https://github.com/qbee-io/qbee-agent/security/advisories/GHSA-vx32-xf7g-9ghr","tags":["advisory","exploit","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/qbee-io/qbee-agent/pull/148","tags":["fix","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/qbee-io/qbee-agent/commit/eb7875f0a849cb33325956d0b75e27061d7a7fa3","tags":["fix","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/qbee-io/qbee-agent/releases/tag/2026.41","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-129237","tags":["advisory"],"sources":["ghsa","go"]},{"url":"https://github.com/qbee-io/qbee-agent","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-11-18T15:11:42.022Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-129237","url":"https://www.cve.org/CVERecord?id=CVE-2026-129237","licence":"CVE Terms of Use","modified":"2026-11-18T15:12:05.584Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-vx32-xf7g-9ghr","url":"https://github.com/advisories/GHSA-vx32-xf7g-9ghr","licence":"CC-BY-4.0","modified":"2026-11-23T20:41:23.910Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-6987","url":"https://pkg.go.dev/vuln/GO-2026-6987","licence":"CC-BY-4.0","modified":"2026-11-23T20:30:14.213Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-129237","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-129237","licence":"Public domain","modified":"2026-11-18T15:17:38.080Z"}],"updatedAt":"2026-11-25T22:59:50.899Z","epss":{"score":0.00474,"percentile":0.42634,"date":"2026-12-01T12:00:22.000Z"}}