GHSA-VX32-XF7G-9GHR
Vulnerability from github – Published: 2026-11-16 22:35 – Updated: 2026-11-16 22:35Summary
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:
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
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
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:14defines the Docker Compose build context as the remote configuration fieldContext string.app/configuration/compose.go:26enables this path withUseContext.app/configuration/file_manager.go:240-246andapp/configuration/file_manager.go:281-287show that context sources are resolved either fromfile://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:managefromfiles:manage, and maps "Configure -> Modify configuration" toconfiguration:managewhile "Files manager -> Write access" maps tofiles: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 the intended context extraction directory.
- 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.
- The public code and documentation support this boundary for tenants that delegate configuration and/or file-manager access to limited users or CI automation.
- 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.
PoC
Two failing regression tests add.
The utility-level test proves the extractor bug directly:
app/utils/tar_test.go:132Test_TarZipSlipSiblingPrefixBypass
Command:
wsl -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'
Observed result:
=== RUN Test_TarZipSlipSiblingPrefixBypass
tar_test.go:169: expected unpackTar to reject sibling-prefix traversal archive
tar_test.go:174: path traversal: payload was written outside destPath at /tmp/.../context-outside/payload.txt; got "zip-slip-sibling-prefix"
--- FAIL: Test_TarZipSlipSiblingPrefixBypass (0.00s)
FAIL
The Docker Compose bundle-path test proves reachability through Compose.getContext():
app/configuration/bundle_docker_compose_context_zip_slip_test.go:13Test_ComposeContextRejectsSiblingPrefixZipSlip
Command:
wsl -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'
Observed result:
=== RUN Test_ComposeContextRejectsSiblingPrefixZipSlip
bundle_docker_compose_context_zip_slip_test.go:66: expected compose context unpack to reject sibling-prefix traversal archive
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"
--- FAIL: Test_ComposeContextRejectsSiblingPrefixZipSlip (0.00s)
FAIL
Impact
An 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.
The demonstrated impact is constrained path traversal:
- It can write sibling-prefix paths such as
cache/docker_compose/<project>/context-outside/payload.txt. - It does not demonstrate writing arbitrary paths such as
/etc/passwd; those do not pass the current string-prefix check. - It can corrupt or alter files in nearby qbee-agent Docker Compose cache/project paths if their cleaned path shares the destination prefix.
- It may affect integrity or availability of qbee-agent-managed Docker Compose state, depending on the project/cache layout.
This report does not claim direct RCE.
{
"affected": [
{
"package": {
"ecosystem": "Go",
"name": "go.qbee.io/agent"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.0.0-20260908095235-eb7875f0a849"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-129237"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": true,
"github_reviewed_at": "2026-11-16T22:35:40Z",
"nvd_published_at": "2026-11-16T17:17:31Z",
"severity": "MODERATE"
},
"details": "## 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\u0027s Docker Compose documentation lists \"Build Context\" as a Docker Compose configuration option: https://docs.qbee.io/configuration-docker-compose.html\n- Qbee\u0027s RBAC documentation separates `configuration:manage` from `files:manage`, and maps \"Configure -\u003e Modify configuration\" to `configuration:manage` while \"Files manager -\u003e Write access\" maps to `files:manage`: https://docs.qbee.io/account-users-and-roles.html\n- Qbee\u0027s 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\u0027s 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 \u0027cd /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\u0027\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 \u0027cd /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\u0027\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\u0027s 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/\u003cproject\u003e/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.",
"id": "GHSA-vx32-xf7g-9ghr",
"modified": "2026-11-16T22:35:40Z",
"published": "2026-11-16T22:35:40Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/qbee-io/qbee-agent/security/advisories/GHSA-vx32-xf7g-9ghr"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-129237"
},
{
"type": "WEB",
"url": "https://github.com/qbee-io/qbee-agent/pull/148"
},
{
"type": "WEB",
"url": "https://github.com/qbee-io/qbee-agent/commit/eb7875f0a849cb33325956d0b75e27061d7a7fa3"
},
{
"type": "PACKAGE",
"url": "https://github.com/qbee-io/qbee-agent"
},
{
"type": "WEB",
"url": "https://github.com/qbee-io/qbee-agent/releases/tag/2026.41"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L",
"type": "CVSS_V3"
}
],
"summary": "qbee-agent: Docker Compose build context Zip Slip writes outside context directory"
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.