the Eighth Rank Write-up

Remote code execution on Vast.ai host via cloud-sync symlink abuse

Vast.ai lets clients rent GPUs on machines run by independent hosts. We disclosed a vulnerability that allowed an attacker renting a GPU to escape their container and run code as root on the host machine. Vast.ai patched it.

Found by

The position

Promotion: a pawn that reaches the eighth rank stops being a pawn. The pawn is the client's dst path, checked as a string and harmless inside their own container. The host resolves it outside the container, follows the symlink the client planted, and the path arrives as a root write. b8=Q gives check along the eighth rank and hits the knight on b4 down the b-file. The sanitizer read what the path said, not what it would become.

7k/1P3pp1/4p2p/5b2/1n2P3/8/2r2PPP/3R2K1 w - - 0 1

Finding

Target
Vast.ai
Affected
Vast.ai host
Class
Tenant isolation
CWE-59
Severity
9.9critical
Vector
AV:N/AC:L/PR:L
UI:N/S:C/C:H/I:H/A:H
Vendor
Patched

What's Vast.ai

Vast.ai is a marketplace for GPUs; essentially, the Airbnb of GPUs. A host puts GPUs up for rent: an organization or an individual with spare ones. A client rents them, by the hour. At the time of this write-up, Vast.ai manages 20,000 GPUs worldwide with 700k monthly transactions.

How it works: Vast.ai manages two main things: a client-host matching platform that handles prices, offer discovery, and the life-cycle of the renting process; and the software used on clients (APIs to the Vast.ai service) and hosts. When a client rents a GPU through the Vast.ai service, a Docker container is spawned inside the host machine and the GPUs the client is paying for are bound to the container exclusively. The client gets an SSH channel to the container, which they use to carry out the needed computation on the GPU. This process on the host is managed by a daemon (kaalia) provided by Vast.ai, which runs at the highest privilege within the host machine and communicates directly with the Vast.ai servers.

three parties, one machine
HOST MACHINE spawns rented not rented Client rents GPUs by the hour Vast.ai API HTTPS Vast.ai matches clients to hosts prices, offer discovery the rental life-cycle lists GPUs Host puts GPUs up for rent an organization or an individual SSH control connection, opened by kaalia owns Docker container the client’s instance its GPUs bound to it exclusively kaalia daemon Vast.ai’s software uid vastai_kaalia NOPASSWD: ALL GPU GPU GPU GPU GPU GPU GPU GPU

The client talks to Vast.ai to rent and to the container to work. Vast.ai reaches the host machine through kaalia, on a connection kaalia opened.

kaalia is Vast.ai's software. It runs with the highest privilege on the host machine, where it manages the containers.

We found a vulnerability that allowed a malicious client to achieve root-level arbitrary write and so root-level remote code execution on host machines the client was renting a GPU on. Meaning: a malicious client could rent a GPU on a given host, run the exploit to escape the container assigned to them, and achieve root code execution on the host machine. The vulnerability has been fully patched.

The vulnerability

The Vast.ai system provides additional capabilities besides spawning containers on the host's machine. One of these is Cloud Sync. Its purpose is to allow clients to copy files between the file system of the rented container and their own cloud storage (e.g., an AWS bucket), in either direction. Everything below concerns the Cloud To Instance direction.

A copy is one API call that gets two main inputs: the source file to copy from, and a destination path, i.e., where in the client's container to copy the source; for instance:

POST /api/v0/commands/rclone/Cloud Sync, working as intended
{
  "transfer":    "Cloud To Instance",
  "src":         "mybucket:datasets/train.tar",
  "dst":         "/workspace/data",
  "instance_id": 8675309
}
pull an object from your own bucket down into the instance you rented.
the files land at dst, inside the instance.

Now, the thing is that, on the host machine, the code that takes care of the copy does not run within the client's container. It runs as part of a daemon and within the host machine's file system. What happens is that the daemon spawns a Python process that runs rclone which creates the destination path by merging the dst path with the appropriate prefix to reach the writable layer of the client's container, e.g., /var/lib/docker/overlay2/<id>/diff/. The process summarized:

who runs the copy, and where
HOST MACHINE spawns sudo writes Malicious client root inside their own container HTTPS Vast.ai control plane POST /api/v0/commands/rclone/ checks the path as a string Task message, on the connection the host dialed out kaalia daemon uid vastai_kaalia NOPASSWD: ALL python3 handler fetched from S3 at task time rclone uid 0 — root writable layer /var/lib/docker/ overlay2/<id>/diff/ overlayfs merge same bytes, two views 1 2 3 4 5 6

The client never speaks to kaalia. The host machine dials out and the control plane pushes it a task; everything after that happens on the host machine.

The code that performs the copy is fetched by the daemon at task time.

The destination path was sanitized: .., quotes, and shell metacharacters were all rejected. Symlinks were not. So, how we exploited this: we created a destination path that pointed to a symlink into the container's file system (recall: the client has SSH on the container running on the host), in turn, the symlink pointed to a path that resolved into the host file, e.g.,

inside our own containerplant the link
$ ln -sfn /var/lib/vastai_kaalia /root/vpdst
$ ls -la /root/vpdst
lrwxrwxrwx 1 root root 24 /root/vpdst -> /var/lib/vastai_kaalia

The host followed the link out of the container, allowing a write into the directory it pointed to:

one link, two namespaces
The client creates one symlink, in their own container ln -sfn /var/lib/vastai_kaalia /root/vpdst resolved in the container resolved on the host Container’s view ls /root/vpdst/ No such file or directory the path does not exist here — checked before the run Host’s view overlay2/<id>/diff + /root/vpdst the kernel follows the link → /var/lib/vastai_kaalia/ What the API server rejects .. ' " # ~ whitespace a symlink contains none of them inferred — deliberately not run rclone writes the object read_packs.py the name comes from the attacker’s own bucket */5 * * * * python3 /var/lib/vastai_kaalia/read_packs.py root’s crontab — the interpreter is on the command line, so only the contents matter

The client wrote the link from inside. The host followed it from outside. Same inode, two namespaces, and the only one that got consulted was the one the client was not in.

Now, because rclone is executed as part of the daemon running on the host, it has root privileges; therefore, the one above was an arbitrary write with root privileges primitive. An arbitrary root write is not yet code execution. On a Vast.ai host, the step from one to the other was a root cron job. update_scripts.sh puts four entries in root's crontab, and one of them is:

root's crontab, on the hostinstalled by update_scripts.sh
*/5 * * * * python3 /var/lib/vastai_kaalia/read_packs.py
# the interpreter is named on the command line, so the file's mode and owner
# do not matter. Only the contents do — and a copy overwrites contents.

So an attacker could point the write at /var/lib/vastai_kaalia/read_packs.py, copy their own Python over it (e.g., a reverse shell), and within five minutes root would run it. That is root code execution on the host.

Other findings

During the game with Vast.ai, we could locate an additional critical vulnerability with equivalent impact to the abuse of rclone above but that required a man-in-the-middle attacker:

Vast.ai-to-host communication could be downgraded to be plain-text (and get root code execution on host to a MitM)

An attacker who sat on the network path between a host and Vast.ai's control plane could run commands as root on that host, with no Vast.ai account, no rented instance, and nothing to break in the cryptography.

The daemon we tested (version 303) set TLS up correctly — it loaded the CA bundle, verified the certificate, and pinned both the hostname and the peer's IP, so a forged certificate was refused. The defect was in the caller: when the TLS connection failed, the daemon retried the same connection in cleartext and logged TLS connect failed; falling back to cleartext. The attacker never had to touch the certificate. They made the handshake fail (a dropped packet, a TCP reset) and answered the cleartext connection that followed. Nothing under the transport authenticated the peer, so a single-element Command on that link went straight to /bin/sh -c as the daemon's account, which has sudo.

fail the handshake, answer the retry
kaalia daemon on the host machine version 303 Attacker on the network path no account, no rental Vast.ai control plane the intended peer never reached 1 · TLS, SET UP CORRECTLY TLS handshake What TLS checks, and holds CA bundle loaded certificate verified hostname and peer IP pinned the defect is in the caller, not here makes it fail: a drop, a reset, or a certificate that is refused TLS connect failed; falling back to cleartext 2 · RETRIED IN CLEARTEXT reconnects, with no TLS answers in place of the control plane "command": ["<cmd>"] no token, no nonce, no signature /bin/sh -c uid vastai_kaalia a host process sudo root inferred — deliberately not run

TLS was never broken. The daemon dropped it whenever a handshake failed, and the attacker decided when a handshake failed.

The attacker needed no Vast.ai account and no rental, only a place on the path. Everything down to /bin/sh -c was run against daemon 303 in an airgapped lab. The last leg is drawn dashed: the step from that account to root was deliberately not run.

Credits

We thank the Vast.ai team for the flawless collaboration and handling of the reported vulnerabilities.

Timeline

  1. Vulnerabilities found on desk investigation
  2. Vulnerabilities verified
  3. Vulnerabilities disclosed to the Vast.ai team via VDP
  4. Vulnerabilities officially patched

How to cite this game

BibTeX · click to select
@misc{8rank:vast-cloud-sync-host-write,
  author       = {Dario Pasquini and Micha{\l} Bazyli},
  title        = {{Remote code execution on Vast.ai host via cloud-sync symlink abuse}},
  year         = {2026},
  month        = nov,
  howpublished = {\url{https://8rank.ai/game/vast-cloud-sync-host-write}},
}