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.
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:
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 container plant 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:
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 host installed 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.
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
- 2026-08-31Vulnerabilities found on desk investigation
- 2026-09-01Vulnerabilities verified
- 2026-09-01Vulnerabilities disclosed to the Vast.ai team via VDP
- 2026-11-04Vulnerabilities officially patched