Side-Channel Attack Risks in Shared Sandbox Infrastructure
Malicious tenants can steal secrets from sandbox neighbors by exploiting shared hardware.

Side-channel attacks steal secrets from shared computing infrastructure without ever breaking encryption or bypassing a login. A useful working definition: these attacks exploit unintended leakage generated during computation itself, not a flaw in the logic of a system's defenses. That distinction matters more than it sounds like it should, because it means an attacker never needs privileged access to pull this off. The channel is physics and timing, not permissions, and no firewall was ever built to stop physics.
Four signal types make up the family. Timing attacks infer secrets from how long an operation takes to run. Cache attacks read memory access patterns through shared cache state, watching what got evicted and when. Power analysis and electromagnetic analysis round out the classic list, inferring computation from energy draw or radiated signal, though both matter less in cloud contexts than in physical hardware attacks against smart cards or embedded devices. What they share is the target: not the software's logic, but the hardware's behavior while running that logic.
Spectre and Meltdown turned this from a largely theoretical concern into a widely demonstrated cross-boundary threat. Both showed that speculative execution, a performance feature built into nearly every modern CPU, leaves traces in microarchitectural components like caches, and that a process with no special privileges could read those traces from across a supposed isolation boundary. That was the moment the industry had to admit that logical isolation, namespaces, access controls, permission checks, governs what code is allowed to request. It says nothing about what the hardware underneath reveals regardless of the request. Shared physical hardware means shared physical state, and shared physical state is the attack surface. Everything below unpacks what that means for sandbox infrastructure specifically, and where the industry's current defenses actually stop working.
How multi-tenant sandbox infrastructure creates the conditions these attacks require
Side-channel attacks need one thing above all: co-location. Attacker and victim have to share physical resources, or there's no channel to exploit. Multi-tenant sandbox infrastructure is co-location by design. That's the entire economic model, running many tenants' workloads on the same physical machines to keep costs down. These attacks depend on whether the conditions for them exist in shared sandboxes. It's how many layers of sharing stack up, and what each one leaks.
Start with the CPU. Co-resident tenants share the same physical cores, the same branch predictor, the same TLB (translation lookaside buffer), the same speculative execution pipeline. Move up a level and there's the cache hierarchy: L1 and L2 caches are usually per-core, but the last-level cache (LLC) is typically shared across all cores on a chip, holding state from every process running on that machine. The LLC is the most commonly exploited layer in published cache attacks, for reasons the next section gets into. Below all of that sits the shared memory bus and DRAM, where access timing is observable across tenant boundaries, and in container-based sandboxes, every container on a host shares the same kernel, turning kernel state into yet another channel available to a nosy neighbor.
Think about what that means for an attacker's starting position. A tenant who can run arbitrary code inside a co-located sandbox is already past the perimeter. No network path to the victim is needed. They share silicon with them. That's a much stronger position than most threat models account for, because most defenses are built assuming the attacker has to get in first.
AI sandbox environments add a wrinkle worth sitting with. Agents execute code generated at runtime from natural language input, which means the instruction set running inside the sandbox isn't fixed or auditable at deploy time the way a traditional application's code is. An attacker's payload, in other words, can be shaped dynamically to probe for side channels, adjusting its approach based on what it learns. The research literature frames this in blunt terms: timing channels can be exploited across shared cloud infrastructure, and malicious co-located users can potentially steal sensitive data from legitimate co-tenants. That's not a hedge. It's a description of something already demonstrated, not a hypothetical risk.
The channels that matter most in sandbox contexts break down into three families: timing, cache, and CPU microarchitecture. Each deserves its own look, because each fails differently and gets defended differently.
Timing attacks: what execution time reveals and why sandboxes make measurement easier
Here's the mechanism, stripped down. Operations on secret data, key comparisons, cryptographic routines, conditional branches, take measurably different amounts of time depending on what the secret value actually is. An attacker who can measure execution time precisely enough can reconstruct that secret bit by bit, run after run, without ever seeing the data directly.
Sandboxes happen to be a good measurement environment for this kind of attack, and not by accident. Low-latency sandbox APIs give an attacker a precise clock, since request timing is observable from outside the sandbox boundary. Repeated invocations are cheap and fast, which means statistical averaging can wash out a lot of the noise that would otherwise hide the signal. FaaS (function-as-a-service) platforms and sandbox environments are built for rapid, parallel invocations, that's the whole selling point for running agent workloads at scale, but the same property that makes them useful for agents makes them useful for someone running a timing probe ten thousand times in a row.
This isn't theoretical. A 2024 ACM ASPLOS paper demonstrated an end-to-end, cross-tenant cache side-channel attack against a vulnerable ECDSA implementation running in Google Cloud Run's production FaaS environment. The researchers had to deal with real noise, other tenants' activity flooding the same shared resources, and they got past it using statistical techniques to isolate the signal from the noise of other tenants' activity. The noise problem does exist. It clearly does. Enough statistical technique, applied patiently, lets the signal survive the noise.
What ends up exposed in sandbox workloads runs the gamut: cryptographic key operations, authentication checks, model weight loading sequences, any conditional logic where the branch taken depends on a secret. Constant-time implementations of these operations are the standard defense, and they matter. But they're necessary, not sufficient, if an attacker can measure timing at the infrastructure level rather than watching individual instructions. Fixing the code doesn't fix the platform it runs on.
Cache-based leakage: how shared CPU cache turns memory access patterns into a readable signal
The shared LLC is where most published cache attacks live. On most architectures it's shared across every core on the chip (some architectures, some architectures partition the LLC into separate clusters, so not every core shares the same slice). Where it is shared, a tenant's memory access pattern evicts specific cache lines, and that eviction leaves a timing footprint a co-tenant can read from their own process, with no special access required.
Two attack primitives show up again and again in the research literature. Flush+Reload works like this: the attacker flushes a cache line out of the shared cache, waits for the victim to run, then reloads that same line and times how long it takes. A fast reload means the victim touched that line in the meantime. A slow one means they didn't. Repeat that across enough lines and the attacker reconstructs the victim's access pattern in surprising detail. Prime+Probe runs the same idea in reverse: the attacker fills an entire cache set with their own data, waits, then measures how long it takes to access their own data again. If it's slow, the victim evicted them by using that same cache set. Neither technique requires reading the victim's memory directly. Both just watch the shadow the victim casts on shared hardware.
A 2020 ScienceDirect survey on cache attack vectors makes an admission worth sitting with: completely mitigating every cache side-channel attack vector would require overhauling the entire system, and the fix-then-break cycle just continues as new vectors get discovered. That's not defeatism. It's an honest description of where the field actually stands.
AI workloads add specific, named versions of this problem. Research has demonstrated that cache behavior in shared AI inference environments can leak information about a model's architecture and hyperparameters to a co-tenant with zero privileged access, purely by watching access patterns from the outside.
As a calibration point for how much bandwidth these channels actually carry: researchers demonstrated a remote Spectre attack (cache-based) against Cloudflare Workers, reliably leaking up to 12 bits per second at 99% accuracy in a production environment. Twelve bits a second sounds slow, and it is. But given enough time, that's more than enough to reconstruct a cryptographic key.
Speculative execution attacks: how CPU performance optimizations become cross-tenant information conduits
Modern CPUs speculatively execute instructions before they know for certain those instructions are needed, a performance trick that's been standard practice for decades because it makes chips faster. When speculation guesses wrong, the CPU rolls back the result. What it doesn't roll back is the trace that speculative execution leaves behind in caches and other microarchitectural state. That trace persists, readable, even after the CPU has discarded the speculative computation itself.
This is what makes speculative execution attacks so hard to defend against with software alone. The leaked trace lives in hardware state, not in memory the operating system can protect. Namespaces, capability systems, seccomp policies, none of them have visibility into what's happening at that layer, because they were built to govern software behavior, not the physical state a chip leaves lying around after a guess goes wrong.
Spectre and Meltdown established this as widely recognized fact rather than conjecture: they provided prominent public proof that speculative and out-of-order execution could undermine hardware-enforced isolation at the microarchitectural layer. Cloudflare's own response is a useful real-world case study of what living with this actually looks like. After demonstrating that 12 bit/s remote Spectre attack against Workers, Cloudflare improved its Dynamic Process Isolation system, integrated the V8 Sandbox, and added an in-process isolation mechanism. Those weren't routine software patches. They were structural changes made in a live production environment specifically to contain a hardware-level side channel that no ordinary code fix could touch.
Firecracker, the microVM technology widely treated as the gold standard for sandbox isolation, isn't exempt either. Research examining the microarchitectural security of the Firecracker VMM in serverless cloud settings has found real exposure to speculative execution side channels. That finding matters precisely because Firecracker's reputation rests on strong isolation. MicroVM boundaries do a lot of work reducing attack surface, but they don't reach down into the CPU's speculative execution hardware, because that hardware sits below the boundary Firecracker draws.
No commodity CPU on the market today offers complete speculative execution isolation across tenants. That's not a criticism of any particular vendor or platform. It's the current state of the hardware. The real question for anyone architecting sandbox infrastructure is whether they can manage this channel. It's how much they can shrink the signal, and what workloads are sensitive enough to require shrinking it further than the default.
GPU interconnects and the side-channel surface that CPU-focused isolation does not reach
Everything covered so far, timing, cache, speculative execution, concerns isolation centered on a specific type of processing hardware. GPUs run on a different playbook entirely, and most of the isolation architecture built for CPUs simply wasn't designed with GPU sharing in mind. AI inference pipelines routinely share GPU memory, VRAM bandwidth, and interconnect fabric across tenants, and technologies like Firecracker microVMs or gVisor's user-space kernel have no jurisdiction over any of it.
Research on NVBleed, published in 2025, demonstrated covert and side-channel attacks running over NVIDIA's multi-GPU interconnects. It's part of a growing body of work confirming that GPU-shared infrastructure opens up cross-tenant leakage paths that sit entirely outside what CPU isolation was built to address. Separately, CVE-2025-23266, disclosed by Wiz Research and nicknamed NVIDIAScape, describes a flaw in the NVIDIA Container Toolkit that allows arbitrary code execution, privilege escalation, and data tampering on the host in vulnerable configurations. That one isn't a side channel in the classic sense, it's closer to a conventional privilege escalation bug, but it illustrates the same underlying point: GPU-specific infrastructure widens the attack surface well past what container isolation was ever meant to cover.
Firecracker's own limits show up clearly here. It doesn't support GPU passthrough beyond a minimal emulated device set. Teams that need GPU passthrough have to reach for alternative hypervisors instead, which brings additional emulation complexity along with it and meaningfully expands the attack surface in the process. Put plainly: no team currently gets Firecracker's microVM isolation guarantees and GPU passthrough at the same time, not without trading away some of that isolation to get there.
For agent workflows built around model-in-the-loop inference sharing GPU compute across tenants, the honest framing is that GPU interconnect side channels are an open, unresolved threat. There's no standard mitigation today that matches what microVM isolation provides at the CPU level. Teams whose threat model actually includes GPU-accelerated inference are left with a narrow set of real options: allocate GPUs per tenant rather than sharing them, or accept, with eyes open, that the side-channel surface for that workload extends into the interconnect layer and isn't closing anytime soon.
How stateful sandbox design introduces side-channel risks that ephemeral execution avoids
Security teams built their instincts defending stateless applications, request comes in, gets processed, state disappears. Agent sandboxes break that assumption on purpose. They maintain persistent state, remember prior interactions, and feed those memories into future decisions. That's a categorically different threat model, and it opens leakage paths that never existed in a stateless world.
Snapshotting is where this shows up first. When a sandbox gets snapshotted, its entire memory state, including any secrets that happened to be in flight the moment it suspended, gets serialized to storage. If that snapshot storage isn't encrypted and access-controlled on a strict per-tenant basis, the snapshot file itself becomes a direct cross-tenant leakage path, no cache probing or timing analysis required. Just read the file.
The risk compounds from there. A snapshot that's compromised or improperly isolated reintroduces a foothold every single time it gets restored, which means the leakage recurs continuously. It's baked into the sandbox's lifecycle, recurring on a schedule set by however often that snapshot gets resumed.
Memory poisoning is the stateful world's answer to cache probing, in a sense, though the mechanism is entirely different. An attacker who can influence an agent's long-term memory store can gradually shift its behavior toward false data or subtly wrong instructions, not through a single dramatic breach but through slow, patient manipulation that exploits the fact that state persists at all. Where cache attacks read hardware signals, memory poisoning writes bad signal into the record the agent trusts.
None of this means stateful sandboxes are a bad idea. It means the trade-off has to be made explicit rather than assumed away. Ephemeral compute, spin up, execute, destroy, eliminates persistent footprint risk and snapshot leakage entirely, and it's the strongest available mitigation against this whole class of risk. Stateful compute, resuming from a snapshot with filesystem and memory state intact, is what makes long-running agent workflows possible in the first place, but it carries the snapshot and memory-poisoning risks described above as the cost of that capability. Neither option is better in some abstract sense. The right choice depends entirely on what the workload actually needs.
Resume speed also cuts both ways, and that point deserves attention here too. Platforms using microVM isolation can resume a suspended sandbox from standby in under 25 milliseconds while keeping filesystem and memory state fully intact. That's a genuinely useful capability for long-running agent work. But fast resumption also means fast re-exposure: whatever secret existed in memory at the moment of suspend comes right back the moment the snapshot resumes, and the speed that makes the system usable is the same speed that makes the exposure window hard to catch.
What isolation architectures actually reduce and what they leave unresolved
The industry has settled, roughly, on three architectures for strong sandbox isolation: Firecracker microVMs, gVisor, and Kata Containers. Each takes a genuinely different approach, and each comes with its own mix of isolation strength, performance overhead, and operational complexity. None of them closes every gap this article has walked through.
Firecracker eliminates the shared-kernel attack surface by giving each execution its own kernel, running inside a lightweight VM backed by KVM hardware virtualization, with memory overhead under 5MB per instance and boot times under 125 milliseconds. That's a real, measurable win against the kernel-sharing risk described earlier. But research has found ongoing exposure to speculative execution side channels even inside the Firecracker model, because the microVM boundary doesn't reach the CPU's speculative execution hardware, that layer sits below anything a VM boundary can touch. And GPU passthrough, as covered above, means stepping outside Firecracker's minimal device model entirely and accepting the attack surface that comes with QEMU or Cloud Hypervisor instead.
gVisor takes a different path. It intercepts application system calls in user space through a memory-safe Go runtime called the Sentry, so sandboxed workloads never touch the host kernel directly. That meaningfully narrows the kernel attack surface. gVisor's own documentation is upfront about the limits, though: it reduces, but doesn't eliminate, dependency on the host OS, and hardware-level side channels, cache attacks, speculative execution leakage, operate below where gVisor's interception layer can see or stop them.
Kata Containers runs each container inside its own lightweight VM, pairing familiar container workflows with VM-level kernel isolation, though like other microVM-based approaches it does not reach down into the CPU's speculative execution hardware. WASM and V8 isolates offer a narrower but genuinely strong option for well-typed, constrained workloads: memory access is restricted to the instance's own linear memory region, with no ambient authority granted by default. That scope, though, is exactly why they don't fit general-purpose agent code execution, where the whole point is running code nobody fully specified in advance.
Kubernetes-native tooling is the newest entrant here. The agent-sandbox project (github.com/kubernetes-sigs/agent-sandbox) launched in November 2025 at KubeCon Atlanta, bringing CRD manifests for Sandbox, SandboxTemplate, SandboxClaim, and SandboxWarmPool resources, example templates wired up for gVisor and Kata under RuntimeClass configurations, and a Python SDK. It's not generally available yet. Worth watching for teams already deep in Kubernetes orchestration, but not something to build a production security posture on today.
Put all of this together and the honest summary is that no current isolation architecture closes off timing, cache, and speculative execution leakage all at once. Each approach reduces one part of the surface while leaving another part exactly where it was. That's not a failure of engineering so much as a description of where hardware and software isolation currently meet their limit. The job for anyone architecting sandbox infrastructure is picking the option that handles trade-offs honestly. It's figuring out which of these channels actually threatens the workload in question, and choosing the architecture that reduces that specific risk the hardest.


