GPU Sandboxes for AI Agents (2026): Isolation Options, GPU Sharing Risks, and How to Give Untrusted Code a GPU Safely
To give untrusted agent code a GPU safely, you need a boundary that still holds with the GPU driver exposed. Today that means gVisor with nvproxy or a VM with GPU passthrough, plus a whole GPU per sandbox (or a MIG instance behind a VM with vGPU), a patched driver, and locked-down egress. On Contro

Posted on Nov 20 • Originally published at controlplane.com • AI-assisted
To give untrusted agent code a GPU safely, you need a boundary that still holds with the GPU driver exposed. Today that means gVisor with nvproxy or a VM with GPU passthrough, plus a whole GPU per sandbox (or a MIG instance behind a VM with vGPU), a patched driver, and locked-down egress. On Control Plane, the agent can run in a Control Plane Sandbox while GPU steps run as separate workloads built from a reviewed image, so agent-generated code does not run on the GPU. Those workloads can attach NVIDIA GPUs, get drivers installed and updated by Control Plane on its managed regions, and start with no credentials and outbound traffic blocked.
Disclosure: Control Plane publishes this guide.
GPU isolation is harder than CPU isolation because every sandbox has to reach the NVIDIA kernel driver, and the NVIDIA Container Toolkit that wires GPUs into containers has had critical escape CVEs.
Give each GPU step its own isolated boundary, a dedicated GPU or MIG instance, a patched driver, and no network or credentials beyond what the step needs.
A GPU sandbox has to expose a large kernel-mode driver that CPU sandboxes never touch.
CPU sandboxes intercept system calls and restrict access to well-understood kernel interfaces. A GPU workload also has to talk to the NVIDIA driver through device nodes such as /dev/nvidiactl, /dev/nvidia-uvm, and /dev/nvidia#, and that conversation is the weak link in every model.
Most Kubernetes GPU setups use the NVIDIA Container Toolkit, where containers share the host kernel. CVE-2025-23266 (CVSS 9.0) allowed arbitrary code execution with elevated permissions through container initialization hooks. CVE-2024-0132 let a crafted container image access the host file system, and NVIDIA notes that setups using CDI are not affected. Both are documented escapes from the container boundary through the GPU stack.
gVisor nvproxy narrows the exposure by proxying driver calls inside the sandbox and allowing only the compute and utility capabilities by default. gVisor’s own documentation says it protects the host from the sandboxed application and is much less effective against vulnerabilities in the NVIDIA driver itself. VM passthrough moves the driver into a guest kernel behind a hypervisor boundary, but the driver still runs in the guest and still needs patching. The ranking of the best AI agent sandboxes in 2026 compares sandbox boundaries for CPU workloads.
Each option trades isolation strength, GPU coverage, and operational maturity.
The sharing method decides whether one tenant’s memory access or fault can reach another.
MIG is the strongest sharing option short of a dedicated GPU, and it is available on specific data center GPUs from the Ampere generation on. Under gVisor or plain VM passthrough, that leaves a whole GPU per tenant. T4, L4, and A10G do not support MIG, so a fleet of those cards can isolate untrusted tenants only by giving each one a whole GPU. Toggling MIG mode requires CAP_SYS_ADMIN, so MIG configuration happens at the node or operator level, outside the sandbox. MPS clients also share one server process, so a hung or faulting client can stall every client on the GPU.
Each control closes a gap that GPU access adds on top of standard CPU sandboxing.
No, because it protects in the opposite direction.
NVIDIA Confidential Computing protects AI workloads, model weights, and data from the infrastructure operator, so a malicious host cannot read GPU memory. Confidential computing itself adds no protection for the host against the code running inside; that protection comes only from the VM boundary. Confidential computing and sandboxing solve different problems, and one does not replace the other.
Control Plane handles Day 2 operations for you, including autoscaling, built-in observability, and security.
Workloads can attach NVIDIA GPUs, and the pricing page lists models from T4 to B200. On Control Plane-managed regions, the docs list NVIDIA T4 (1 to 4) and A10G (1), and GPU drivers are installed automatically and kept current by Control Plane. GPU access is enabled for an org by Control Plane support. Control Plane’s Capacity AI, which right-sizes CPU and memory between a minimum and maximum based on historical usage, is not available for GPU workloads, because GPU allocation is fixed.
Workloads start with all inbound and outbound traffic disabled, and outbound access can be limited to specific hostnames or CIDRs. The internal firewall is also closed by default, so you allow only the agent’s workload to call the GPU workload, over mutual TLS with a unique client certificate per workload. Workloads have no Kubernetes API access or tokens. Each workload is isolated with cgroups, namespaces, and restricted syscalls and capabilities.
A practical pattern for AI agents keeps the agent and its GPU steps apart. The agent works in a Control Plane Sandbox, a dedicated Kata Containers microVM with persistent storage built for agents running untrusted code. GPU steps run as separate GPU workloads built from a fixed, reviewed image. The agent sends them only inputs through a narrow API, never code, so the GPU runs only code you reviewed. The GPU workloads hold no credentials and have outbound traffic blocked, which limits what a compromised step can reach.
On your own clusters joined through Control Plane’s Bring Your Own Kubernetes (BYOK), a workload can also request non-NVIDIA accelerators such as AMD GPUs. Control Plane’s GPU Ocean lets you pull GPU capacity from any provider, which you can do today with Control Plane Managed Kubernetes (MK8s) by joining GPU servers as locations. The guide to running AI/ML containers on GPUs without vendor lock-in covers running GPU containers across clouds.
Control Plane’s Universal Cloud Identity lets workloads call AWS, GCP, and Azure services with no long-lived cloud keys in your code. Control Plane is PCI DSS Level 1, SOC 2 Type II, HIPAA, and GDPR compliant.
These answers cover common questions about GPU sandboxes for AI agents.
A GPU sandbox is an isolated, short-lived environment that gives untrusted or agent-generated code controlled access to a physical GPU while protecting the host, the driver, and other tenants. It pairs an isolation boundary such as gVisor or a VM with controlled GPU device access and strict network, credential, and resource rules.
No. VFIO device passthrough, which GPU access requires, is an open feature request in Firecracker. Firecracker added opt-in PCI support in v1.13, but GPU passthrough is not available.
Yes, through nvproxy, enabled with the --nvproxy flag. Officially supported GPUs include T4, A100, A10G, L4, and H100. gVisor exposes only /dev/nvidiactl, /dev/nvidia-uvm, and /dev/nvidia#, allows only the compute and utility capabilities by default, and requires a host driver version on gVisor’s supported list. gVisor is a CNCF sandbox project.
No. NVIDIA’s documentation states there is no memory or fault isolation between time-sliced replicas, and Google warns against GPU time-sharing in sandboxed Pods on GKE.
MIG partitions a supported GPU into up to seven GPU instances with separate, isolated paths through the memory system, while time-slicing shares the whole GPU by switching contexts with no memory or fault isolation. MIG is available on specific data center GPUs from the Ampere generation on, including A100, A30, H100, H200, B200, and GB200; T4, L4, and A10G do not support it.
Yes. GPUs are managed through device plugins and requested in resource limits, and Dynamic Resource Allocation had its core reach GA in Kubernetes 1.34. NVIDIA’s DRA driver has full-GPU and existing-MIG allocation GA, while dynamic MIG, MPS, custom time-slicing settings, and passthrough are alpha. RuntimeClass selects the sandbox runtime, such as gvisor on GKE or kata-vm-isolation on AKS. On Control Plane, workloads request GPUs in their container spec on managed regions, and on clusters joined through BYOK they can also request non-NVIDIA accelerators such as AMD GPUs. The guide on how to choose an AI agent sandbox lists the broader evaluation criteria.
No. NVIDIA Confidential Computing protects workloads, model weights, and data from the infrastructure. It adds no protection for the host against the code running inside, so it addresses the opposite threat.
Control Plane runs the agent in a Control Plane Sandbox and sends GPU steps to separate GPU workloads built from a fixed, reviewed image, which receive only inputs, never code, through a narrow API. Those workloads can attach NVIDIA GPUs, and the pricing page lists models from T4 to B200, with drivers installed and kept current by Control Plane on its managed regions. They start with all inbound and outbound traffic disabled, hold no credentials or Kubernetes API tokens, and are isolated with cgroups, namespaces, and restricted syscalls and capabilities.
No. Control Plane’s Capacity AI right-sizes CPU and memory, and it is not available for GPU workloads because GPU allocation is fixed.
Talk to the Control Plane team or sign up free to run GPU workloads for your AI agents.
Originally published on the Control Plane blog.