Security

CubeSandbox: any host path mounted into a tenant's MicroVM

CubeSandbox host-mount - unrestricted host-directory bind-mount: any sandbox-create caller mounts arbitrary host paths (read-write) into their MicroVM, leading to host root, MicroVM escape and cross-tenant compromise (GHSA-8frp-jfpv-5vhv)

PUBLISHED SEVERITY HIGHSTATUS PatchedGHSA-8frp-jfpv-5vhv
Patched

Fixed in CubeSandbox 0.5.1 (2026-07-11) by #756, which limits host-mount paths to operator-configured prefixes (default /data/shared/). Track the fix at TencentCloud/CubeSandbox#756.

Product
CubeSandbox (CubeAPI, CubeMaster, Cubelet) in TencentCloud/CubeSandbox
Affected versions
CubeSandbox before 0.5.1 (reviewed at cecb2e8, v0.5.0 plus 8 commits, 2026-07-04). Fixed in 0.5.1 (2026-07-11).
Severity
HIGH
Status
Patched
Weaknesses
  • CWE-284Improper Access Control
  • CWE-22Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
  • CWE-269Improper Privilege Management
As filed on the advisory.
GitHub advisory
GHSA-8frp-jfpv-5vhv
Published by the maintainer on 2026-09-18
CVE
Pending (requested from MITRE)
Published
Credit
Finder: Aaron Elijah Mars of Aeon. Tool: Aeon (https://www.aeon.fun).

What users should do now

Upgrade to 0.5.1 or later (the latest release is 0.7.2). It includes #756, which only allows host-mount paths under configured prefixes.

  1. Upgrade CubeMaster, CubeAPI and Cubelet on every node to 0.5.1 or later.
  2. Review allowed_host_mount_prefixes under extra_conf in the CubeMaster config. Leave it at the default (/data/shared/) or list only the narrow directories tenants really need. Never list system paths or the Cubelet data directory (/data/cubelet).
  3. Prefer read-only host mounts. A host-mount entry is still read-write unless the caller asks for readOnly.
  4. Until you upgrade, do not let untrusted callers create sandboxes, or drop the host-mount key from the metadata of POST /sandboxes requests at your gateway.
  5. If untrusted tenants could create sandboxes on an older version, treat the nodes as possibly compromised: check them for unexpected bind mounts under /data/cubelet/hostdir/ and rotate host and Cubelet credentials.

Summary

CubeSandbox runs untrusted, often LLM-generated code inside MicroVMs and sells hardware-level isolation as its core guarantee. Its host-mount feature lets a sandbox-create request ask for a host directory to be shared into the MicroVM. Before 0.5.1 nothing checked which directory: no authorization step, no allowlist, and no denylist. Any caller allowed to create a sandbox could mount any path on the Cubelet node, including /, and the mount was read-write unless the caller asked otherwise. The escape needs no kernel or VMM bug. It is a missing check in the control plane.

Affected versions

CubeSandbox before 0.5.1, in any deployment where a caller who is not fully trusted can create sandboxes. The host-mount path runs through CubeAPI, CubeMaster and Cubelet, and the issue was present from when the feature was added until the fix. Reviewed at cecb2e8 (v0.5.0 plus 8 commits, 2026-07-04). Fixed in 0.5.1 (2026-07-11).

Impact

A tenant creating a sandbox could set the Cube-specific host-mount metadata entry to any absolute host path. Cubelet then bind-mounted that path recursively, as root, into the share it exports to the guest over virtio-fs. With the host root mounted read-write, code inside the MicroVM could:

  • Read any host file, such as /etc/shadow, host SSH keys, Cubelet's config and credentials, TLS keys, and the private key of the CubeEgress interception CA.
  • Read other tenants' data. The rootfs and memory-snapshot files of every other sandbox on the node live under the Cubelet data directory on the same host.
  • Take over the container runtime through the host's containerd socket, which controls every sandbox on the node.
  • Run code on the host as root, by writing to the host filesystem (for example a cron entry, a systemd unit or root's SSH authorized_keys).

The only precondition is permission to call sandbox create, which is the normal baseline privilege of a tenant. The maintainer published the advisory as High.

Affected code

Permalinks at cecb2e8, the commit reviewed before the fix.

At this commit no feature flag, config option or allowlist in the repository gates or limits host-mount.

Fix

  • #756 (merged 2026-07-05) adds validateHostPath() in CubeMaster. It cleans the path to remove .. and accepts it only if it falls under one of the allowed_host_mount_prefixes, which default to /data/shared/. It covers both the host-mount annotation and the direct volume API.
  • The same PR makes CubeMaster refuse to start if / is listed as an allowed prefix, and documents path restriction and multi-tenant layouts for persistent storage.
  • Released in 0.5.1 (2026-07-11). The check is still in place on master today.

Detection (for defenders)

On each Cubelet node, list active bind mounts under /data/cubelet/hostdir/ (for example with findmnt) and flag any whose source is outside the directories you meant to share, especially /, /etc, /root, /run or /data/cubelet. In CubeMaster logs, look for [hostdir] raw annotation lines and sandbox-create requests whose host-mount metadata names such paths. After upgrading, rejected requests return an error that the hostPath is not within an allowed mount prefix. A working exploit is withheld.

Timeline

  1. Reported privately via GitHub PVR (GHSA-8frp-jfpv-5vhv), with a suggested fix.
  2. Maintainer merges #756 (host-mount path allowlist).
  3. CubeSandbox 0.5.1 released with the fix.
  4. We ask in #1184 for the advisory to be published, since the fix had shipped; the maintainer closes the issue the next day.
  5. Maintainer publishes GHSA-8frp-jfpv-5vhv as High.
  6. CVE ID requested from MITRE.
  7. We ask the maintainer in #1920 to request a CVE ID for the published advisory; public write-up.

Credit

Finder: Aaron Elijah Mars of Aeon. Tool: Aeon.

References