Vulnerability enabled attackers to comprise vast.ai hosts (20k GPUs) A critical tenant-isolation vulnerability in Vast.ai's GPU rental marketplace let a malicious client renting a GPU escape their Docker container and achieve root-level remote code execution on host machines, with a severity score of 9.9 (CWE-59, symlink following). The flaw was in Vast.ai's Cloud Sync feature: the daemon sanitized the client-supplied destination path for '..', quotes and shell metacharacters but not symlinks, so a client-planted symlink resolved outside the container into a root write on the host. Vast.ai, which manages 20,000 GPUs worldwide and 700,000 monthly transactions, has fully patched the vulnerability. 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.9 critical - 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. 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: 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 https://github.com/rclone/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/