VulnWatch by ve1ve2
medium 5.4 EPSS 0.47%

GHSA-vx32-xf7g-9ghr: qbee-agent: Docker Compose build context Zip Slip writes outside context directory

Source:
OSV.dev
Published:
Fetched:
Updated:
Affects:
go.qbee.io/agent

https://osv.dev/vulnerability/GHSA-vx32-xf7g-9ghr ↗

osvgofix-available

qbee-agent: Docker Compose build context Zip Slip writes outside context directory ## Summary `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: ```go strings.HasPrefix(targetPath, destdirClean) ``` This 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. The issue is reachable through the Docker Compose build context path when `UseContext` is enabled. ## Details Code references below were verified against `qbee-io/qbee-agent` commit: - `1d8bdbb7422adb4ca563d3114cbe2817d6ba3581` Affected repository: - `qbee-io/qbee-agent` Affected files: - `app/utils/tar.go` - Docker Compose context path in `app/configuration/bundle_docker_compose.go` The vulnerable extraction code: - `app/utils/tar.go:89-93` ```go 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) } ``` The file is then created at the accepted `targetPath`: - `app/utils/tar.go:96-109` ```go case tar.TypeDir: if err := os.MkdirAll(targetPath, 0755); err != nil { return err } case tar.TypeReg: targetFile, err := os.Create(targetPath) ``` Docker Compose build contexts reach this extractor: - `app/configuration/bundle_docker_compose.go:238-270` The context archive is downloaded and then unpacked into the compose project context directory with `utils.UnpackTar`. Archive source and role evidence: - `app/configuration/compose.go:14` defines the Docker Compose build context as the remote configuration field `Context string`. - `app/configuration/compose.go:26` enables this path with `UseContext`. - `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. - Qbee's Docker Compose documentation lists "Build Context" as a Docker Compose configuration option: https://docs.qbee.io/configuration-docker-compose.html - 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 - 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 Trust-boundary requirement: - The vulnerable primitive is clear: qbee-agent writes a regular file outside Affected: Go:go.qbee.io/agent Fixed in: 0.0.0-20260908095235-eb7875f0a849 References: https://github.com/qbee-io/qbee-agent/security/advisories/GHSA-vx32-xf7g-9ghr https://nvd.nist.gov/vuln/detail/CVE-2026-129237 https://github.com/qbee-io/qbee-agent/pull/148 https://github.com/qbee-io/qbee-agent/commit/eb7875f0a849cb33325956d0b75e27061d7a7fa3 https://github.com/qbee-io/qbee-agent https://github.com/qbee-io/qbee-agent/releases/tag/2026.41

Linked vulnerabilities (2)

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L

qbee-agent: Docker Compose build context Zip Slip writes outside context directory

CWE: CWE-22Aliases: CVE-2026-129237
CVE-2026-129237 medium 5.4 EPSS 0.47% (p42) NVDCVE.orgGHSA
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L

qbee-agent: Docker Compose build context Zip Slip writes outside context directory

CWE: CWE-22Aliases: GHSA-vx32-xf7g-9ghrNVD: Received

Also reported by (1)