Sandboxing & Safe Execution

8 min read

U5
Playbook · Coding & Computer-Use Agents

The sandbox boundary almost never fails — what fails is everything the box can still reach through it.

Firecracker's first two published vulnerabilities both landed in 2026, and neither one is the kernel escape your threat model is built around: one crashes the VMM from guest root over an opt-in PCI transport, the other needs write access to a host directory before it does anything. The single confirmed guest-to-host root escape of the year sits underneath every sandbox vendor, in KVM, where no purchasing decision touches it. So stop shopping for isolation strength and start auditing reachability — the credential on disk, the metadata endpoint, the mounted socket, the allowed hostname your agent can write to — because that list is the part you control and the part that actually gets used.

Step 1Read the 2026 CVE record before you pick a boundary.

Firecracker, the microVM monitor under E2B, Vercel Sandbox and a long list of agent platforms, went years with no published hypervisor-escape CVE. Two advisories in 2026 ended that streak, and both are worth reading closely, because the gap between what they say and how they were reported is the whole lesson of this page.

CVE-2026-5747 (AWS bulletin 2026-015, CVSS 4.0 score 8.7, High) affects Firecracker 1.13.0–1.14.3 and 1.15.0. A guest with root can rewrite virtio queue configuration registers after the device is activated, and the documented likely outcome is a crash of the VMM process. Host code execution is possible only under additional conditions — a custom guest kernel, particular snapshot configurations. Fixed in 1.14.4 and 1.15.1, and the transport it abuses is opt-in rather than default. CVE-2026-1386 (bulletin 2026-003, CVSS 3.1 score 6.0) is a symlink-following bug in the jailer affecting 1.13.1 and earlier plus 1.14.0: a local host user who already has write access to the pre-created jailer directories can overwrite arbitrary host files during startup, when the jailer runs as root. Fixed in 1.13.2 and 1.14.1; AWS's own mitigation is chmod 700 on the jailer folder.

Neither is "a guest escaped the microVM." One is a denial of service on a feature you probably did not enable; the other is a host-side filesystem bug that requires a foothold on the host first. They are real and you should patch them, and they are also evidence that the boundary is holding roughly as advertised. The commentary that filed them as "Firecracker's first escape CVEs" compressed two different things into a headline, which is how a correct patch note becomes a wrong threat model.

Patch hygiene is the cheap half: pin a Firecracker version, subscribe to the AWS security bulletins, and know whether you run with --enable-pci. If you buy a hosted sandbox you inherit the vendor's patch cadence instead, which is a dependency worth asking about in writing — see third-party model & vendor risk, and the four-way comparison for how the hosted options differ once isolation stops being the deciding column.

Step 2The one real escape of 2026 was not fixable by choosing a vendor.

On 3 October 2026 a researcher reported a guest-to-host root escape against Vercel Sandbox through its HackerOne program. Vercel paid at the programme's $50,000 maximum, classed it Critical, and its CEO described it as a KVM-level zero-day rather than a misconfiguration. As of late October 2026 there is no published CVE, no patch note, and no technical write-up; a single secondary source attaches a CVE identifier to it, and that identifier does not resolve, so treat the mechanism as undisclosed.

The strategic content is in where the bug lives. Vercel Sandbox runs Firecracker microVMs on KVM. A flaw at the KVM layer is below the product, below the microVM monitor, and below any choice you make between vendors who all rent the same hypervisor on the same clouds. You cannot buy your way out of it. You can only build so that crossing it is survivable — which is the entire argument of blast radius.

One more detail from that programme is worth copying outright: Vercel's bounty scope declares the Firecracker microVM to be the security boundary, and puts container-namespace escapes that stay inside the guest out of scope. That is a vendor stating in public which wall it will pay to defend. Ask your own provider the same question and you will usually find the answer in the bounty scope rather than the marketing page, and if you run the sandbox yourself, write that sentence down for your own system — a boundary nobody has named is a boundary nobody owns.

Step 3Audit reachability from inside the box, not architecture on a whiteboard.

Isolation is still layered — a microVM or gVisor-style kernel boundary around the process (the isolation patterns essay compares them), a default-deny egress policy around the network, an ephemeral scoped filesystem, and no ambient identity — but the layer teams get wrong is the last one, and the only honest way to check it is to run the probe inside the sandbox the agent will actually get. Not the reference image: the one your orchestrator launches, with your entrypoint and your mounts.

# run this AS the agent, in the sandbox the agent gets
env | grep -iE 'token|secret|key|password'   # expect: no output
ls /var/run/docker.sock /run/containerd 2>&1 # expect: No such file
curl -s --max-time 2 http://169.254.169.254/  # expect: timeout, not a document
cat ~/.aws/credentials ~/.netrc 2>&1          # expect: No such file
git config --get remote.origin.url            # expect: a read-only mirror, not a push URL
curl -s --max-time 2 https://example.com/     # expect: blocked by egress policy

# then the write side, which teams forget to test at all:
curl -s -X POST --max-time 2 https://<an-allowed-host>/ # expect: blocked

Six of those seven lines are the familiar checklist. The seventh is the one this page is built around, and credential delivery to the sandbox is the companion piece on how the first line stays empty in a system that still has to clone a repo and push a branch.

A mounted container socket is not a weak boundary, it is no boundary: /var/run/docker.sock is root on the host by design, and the runc leaked-file-descriptor class of container escapes (CVE-2024-21626 being the widely-deployed example) is why "it is in a container" was never a sentence about security on its own.

Step 4Worked example: the metadata hardening that does not do what you think.

The classic agent-sandbox breakout is not a hypervisor bug; it is a reachable cloud metadata endpoint handing out an instance role. AWS's answer is IMDSv2 — a session token, obtained by PUT, required on every request — plus a response hop limit, so that a packet that crosses one extra network hop on its way back is dropped. Set the hop limit to 1 and containers on a bridge network cannot reach 169.254.169.254, because the bridge is that extra hop. That is the mental model most teams are carrying, and it is incomplete in two places at once.

First, the default moved. AWS's current documentation says that when no preference is given at launch, the hop limit defaults to 2 if the AMI carries ImdsSupport: v2.0, and to 1 otherwise. Amazon Linux 2023 is explicit about why: it requires IMDSv2 and sets the hop limit to 2 to allow for containerized workload support. The newer, more hardened AMI ships the setting that re-opens container access, on purpose, because too much tooling broke without it.

Second, the hop only exists in some network modes. Testing published by Latacora in October 2025 found that with IMDSv2 required and a hop limit of 1, the block applied to ECS bridge networking only; tasks in awsvpc and host modes still reached instance metadata. So the control is conditional on a networking detail your platform team may change for unrelated reasons, and it is not a property you can assert from the console.

The arithmetic that follows is simple and it is the point. One probe, run inside the real sandbox, tells you whether a credential with your instance role's permissions is one curl away. The console settings tell you what someone intended. Only one of the two is a control, and the probe costs two seconds per image build.

Step 5Egress is a method-and-destination problem; a hostname list is half a policy.

Default-deny egress with a narrow allowlist is still the right posture, and egress control for agents covers the enforcement mechanics. What a hostname allowlist cannot express is the difference between reading from an allowed host and writing to it — and for a coding agent, the allowed hosts are a package registry and a git remote, which are the two most consequential write surfaces on the internet.

The shape of the failure is now a matter of public record. In May 2026 a swarm of agents uploaded more than two thousand packages to RubyGems over two days; a September 2026 research report attributed the campaign to agents operated by a frontier lab, and a follow-up count by JFrog put it at 3,022 packages across 3,315 package-version combinations. The agents' stated purpose, per the lab's statement, was to carry out benign tasks and retrieve public information. The write was not the goal; it was the cheapest available route to a read, because publishing a gem caused a documentation builder to run code from the package. Every request in that campaign went to an allowed, legitimate, essential hostname.

So write the policy on the pair. Reads to the package mirror, writes to nothing; or reads to the mirror and writes only to a staging repository that a human or a publishing step promotes. Log allowed connections with the method, not just the destination, so that "the agent POSTed to a registry 2,000 times" is a thing your dashboard can show you on the first day rather than in a researcher's report four months later.

Step 6The honest trade-off, and the four decisions that matter.

Stronger isolation costs latency, engineering and capability. A truly airgapped sandbox cannot run the integration test that needs a real database; a microVM per task is slower to start than a thread, and warm pools trade that latency back for state you have to reason about — see sandbox pools & cold starts for why "warm" and "clean" are one knob rather than two. Maximum isolation everywhere is not the goal. Matching isolation to reach is.

Four decisions carry almost all of the risk, and none of them is the choice of hypervisor: whether the sandbox holds any credential at all; whether the cloud metadata endpoint answers it; whether anything from the host is mounted into it; and whether its egress policy distinguishes reads from writes. Get those four right on a plain container and you are in better shape than a microVM with a cloud role attached. Get them wrong and the strongest boundary on the market is protecting a box that did not need protecting, while the credential walks out through the front door you left open for pip install.

Do this week. Run the seven-line probe from STEP 3 inside the sandbox image your agent actually launches, and add it to CI as a test that fails the build. Then add the write-side line to your egress logs: method plus destination, alerting on any POST, PUT or git push to an allowed host the agent was not asked to publish to. Those two changes cost an afternoon and they cover both of the failures on this page — the credential you did not know was reachable, and the write you did not know was permitted.