GHSA-XHV5-8FPQ-G7HF

Vulnerability from github – Published: 2026-11-17 20:48 – Updated: 2026-11-17 20:48
VLAI
Summary
qbee-agent: Local Privilege Escalation and Arbitrary File Tampering via Symlink Following in createFile helper
Details

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.

Impact

Any managed device running qbee-agent up to the affected versions. The impact manifests in three distinct vectors:

  1. 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.

  2. 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.

  3. 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.

Patches

The 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.

Users should upgrade to version 2026.27 (or newer) to fully mitigate these vectors.

Workarounds

If upgrading immediately is not feasible, administrators can apply the following mitigations:

  1. 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.

  2. 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.

  3. 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):

sysctl -w fs.protected_symlinks=1
Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Go",
        "name": "go.qbee.io/agent"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "0.0.0-20260615134032-0fdf8e411de5"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-62336"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-22",
      "CWE-367",
      "CWE-377",
      "CWE-59"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-11-17T20:48:02Z",
    "nvd_published_at": "2026-11-16T20:19:07Z",
    "severity": "HIGH"
  },
  "details": "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\u0027s 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\u0027s server-provisioned public key directly into `/root/.ssh/authorized_keys`. Since the symlink resides inside the user\u0027s 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```",
  "id": "GHSA-xhv5-8fpq-g7hf",
  "modified": "2026-11-17T20:48:02Z",
  "published": "2026-11-17T20:48:02Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/qbee-io/qbee-agent/security/advisories/GHSA-xhv5-8fpq-g7hf"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-62336"
    },
    {
      "type": "WEB",
      "url": "https://github.com/qbee-io/qbee-agent/pull/131"
    },
    {
      "type": "WEB",
      "url": "https://github.com/qbee-io/qbee-agent/commit/0fdf8e411de5d0c142ae2590cf1c54bdfc2e529a"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/qbee-io/qbee-agent"
    },
    {
      "type": "WEB",
      "url": "https://github.com/qbee-io/qbee-agent/releases/tag/2026.27"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "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",
      "type": "CVSS_V4"
    }
  ],
  "summary": "qbee-agent: Local Privilege Escalation and Arbitrary File Tampering via Symlink Following in createFile helper"
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

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.

Loading…

Loading…

Loading…

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.


Loading…