{"id":"CVE-2026-62336","aliases":["CVE-2026-62336","GHSA-xhv5-8fpq-g7hf","GO-2026-6989"],"related":[],"kind":"vulnerability","state":"published","title":"qbee-agent: Local Privilege Escalation and Arbitrary File Tampering via Symlink Following in createFile helper","summary":"qbee-agent is the device agent component of the qbee.io IoT device management platform. Prior to 2026.27, the privileged createFile helper followed attacker-controlled symbolic links during file creation. A local unprivileged user whose account is managed by the SSH Keys bundle could replace ~/.ssh with a link to /root/.ssh, causing the agent to write an authorized key for root. On systems using RAUC download mode with ineffective kernel symlink protection, the predictable /tmp/.bundle.raucb.part path could be linked to a system file and then overwritten or truncated during an update. A file-distribution destination beneath an attacker-controlled directory could similarly redirect the partial-download path so the agent changed ownership of a sensitive file. These vectors could result in root privilege escalation, arbitrary file modification, or denial of service. This issue is fixed in version 2026.27.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"qbee-agent is the device agent component of the qbee.io IoT device management platform. Prior to 2026.27, the privileged createFile helper followed attacker-controlled symbolic links during file creation. A local unprivileged user whose account is managed by the SSH Keys bundle could replace ~/.ssh with a link to /root/.ssh, causing the agent to write an authorized key for root. On systems using RAUC download mode with ineffective kernel symlink protection, the predictable /tmp/.bundle.raucb.part path could be linked to a system file and then overwritten or truncated during an update. A file-distribution destination beneath an attacker-controlled directory could similarly redirect the partial-download path so the agent changed ownership of a sensitive file. These vectors could result in root privilege escalation, arbitrary file modification, or denial of service. This issue is fixed in version 2026.27.","source":"cvelist"},{"lang":"en","text":"This is a Local Privilege Escalation (LPE) vulnerability stemming from improper symlink handling (CWE-59: Link Following) and improper ownership management (CWE-282) inside the qbee-agent file manager logic.\n\n### Impact\n\nAny managed device running qbee-agent up to the affected versions. The impact manifests in three distinct vectors:\n\n1. **Primary Vector (Full Privilege Escalation to Root - Default Configuration)**: If an unprivileged user's account is managed by the SSH Keys bundle, they can replace or remove their own `~/.ssh` directory and create a symlink pointing to `/root/.ssh`. On the next configuration apply, qbee-agent follows the symlink and writes the user's server-provisioned public key directly into `/root/.ssh/authorized_keys`. Since the symlink resides inside the user's own home directory, kernel protections like `fs.protected_symlinks` do not block this execution. The attacker can then instantly log in as root via SSH.\n\n2. **Secondary Vector (Arbitrary File Overwrite / DoS via RAUC Staging)**: On devices utilizing RAUC download mode, the agent uses a predictable, world-writable staging path (`/tmp/.bundle.raucb.part`). If `fs.protected_symlinks` is disabled `(0)`, an unprivileged user can symlink this path to a vital system file (e.g., `/etc/shadow` or `/etc/pam.d/*`), causing the agent to truncate or overwrite it with server-supplied update data during a RAUC update deployment.\n\n3. **Tertiary Vector (Arbitrary File Re-ownership via File Distribution)**: If an operator configures a file-distribution/template destination under a directory owned by an unprivileged user, the attacker can create a symlink at the partial download path targeting a sensitive system file. The agent will then inadvertently execute `file.Chown()` on the targeted file, handing ownership over to the unprivileged attacker.\n\n### Patches\n\nThe vulnerability has been addressed by hardening file creation and directory traversal inside `app/configuration/file_manager.go`. Specifically, the agent now enforces `syscall.O_NOFOLLOW` and proper existence validation flags during privileged operations to prevent link resolution outside intended directories.\n\nUsers should upgrade to version 2026.27 (or newer) to fully mitigate these vectors.\n\n### Workarounds\n\nIf upgrading immediately is not feasible, administrators can apply the following mitigations:\n\n1. Disable the SSH Keys Bundle: Temporarily turn off SSH key management within the Qbee platform for non-trusted local accounts to eliminate the primary privilege escalation vector.\n\n2. Restrict Local Home Directory Alterations: Enforce strict file permissions or monitoring on managed user home directories to block unprivileged users from deleting or replacing ~/.ssh with a symbolic link.\n\n3. Enable Kernel Symlink Protection: Ensure that system-level symlink protections are active to mitigate the secondary `/tmp` vector by verifying that the following sysctl parameter is set to 1 (though note this does not fix the primary home directory vector):\n\n```bash\nsysctl -w fs.protected_symlinks=1\n```","format":"markdown","source":"ghsa"},{"lang":"en","text":"qbee-agent: Local Privilege Escalation and Arbitrary File Tampering via Symlink Following in createFile helper in go.qbee.io/agent","format":"markdown","source":"go"}],"published":"2026-11-16T19:53:38.727Z","modified":"2026-11-23T20:41:31.639Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","score":8.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","score":8.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","rating":"HIGH"}],"cwes":["CWE-22","CWE-59","CWE-367","CWE-377"],"affected":[{"ranges":[{"version":"< 2026.27","status":"affected"}],"vendor":"qbee-io","product":"qbee-agent","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.0.0-20260615134032-0fdf8e411de5"}],"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-20260615134032-0fdf8e411de5"}],"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-xhv5-8fpq-g7hf","tags":["advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/qbee-io/qbee-agent/pull/131","tags":["fix","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/qbee-io/qbee-agent/commit/0fdf8e411de5d0c142ae2590cf1c54bdfc2e529a","tags":["fix","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/qbee-io/qbee-agent/releases/tag/2026.27","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-62336","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":"none","automatable":"no","technicalImpact":"total","date":"2026-11-18T15:25:52.014Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-62336","url":"https://www.cve.org/CVERecord?id=CVE-2026-62336","licence":"CVE Terms of Use","modified":"2026-11-18T15:26:22.697Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-xhv5-8fpq-g7hf","url":"https://github.com/advisories/GHSA-xhv5-8fpq-g7hf","licence":"CC-BY-4.0","modified":"2026-11-23T20:41:31.639Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-6989","url":"https://pkg.go.dev/vuln/GO-2026-6989","licence":"CC-BY-4.0","modified":"2026-11-23T20:30:14.204Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-62336","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-62336","licence":"Public domain","modified":"2026-11-18T16:18:16.400Z"}],"updatedAt":"2026-11-25T22:59:50.924Z","epss":{"score":0.00178,"percentile":0.07688,"date":"2026-12-01T12:00:22.000Z"}}