Remote code execution on Vast.ai via cloud-sync symlink abuse
Vast.ai operates a GPU rental marketplace where clients rent GPUs from independent hosts. A vulnerability was discovered that allowed a GPU renter to escape their Docker container and execute code as root on the host machine. Vast.ai has since fully patched the issue.
How the vulnerability worked
The platform includes a Cloud Sync feature that lets clients copy files between their rented container and cloud storage. The flaw existed in the destination path handling during copy operations.
The destination path passed to rclone was sanitized against "..", quotes, and shell metacharacters, but symlinks were not filtered. An attacker could create a destination path pointing to a symlink within the container's filesystem, which in turn resolved to a path on the host machine.
Since rclone runs as part of the host daemon with root privileges, the symlink resolution resulted in an arbitrary root-level write primitive. The attacker could write arbitrary data to any reachable host path.
Escalation to remote code execution
The initial arbitrary write was not itself code execution. However, the Vast.ai host runs a root cron job (update_scripts.sh) that checks for updates. An attacker could point the write at /var/lib/vastai_kaalia/read_packs.py, overwrite it with malicious Python code (e.g., a reverse shell), and within five minutes the cron job would execute it as root.
Additional findings
A second critical vulnerability was also identified, requiring a man-in-the-middle position between a host and Vast.ai's control plane. When TLS connections failed, the daemon would retry in plaintext, allowing network attackers to send commands as root via the unencrypted channel - no Vast.ai account or rented instance required.
Remediation
Both vulnerabilities were reported through Vast.ai's vulnerability disclosure program and have been fully patched. The company was described as having collaborated flawlessly on the disclosure process.