Back News.Lavx.Hu Researchers escape Firecracker microVM and run code as root on host
PWN Research, led by Paulos Yibelo, says it escaped a Firecracker microVM and executed code as root on the host by modifying a saved register frame at KVM_RUN return. The proof-of-concept wrote a marker to Firecracker's standard error and left the VM accessible over SSH.
PWN Research, led by Paulos Yibelo, says it escaped a Firecracker microVM and executed code as root on the host. The team describes the work as PwnEscape Part 2 and says it builds on a host memory primitive from Part 1. The post labels the demonstration CVE-2026-99999 on a Firecracker setup.
Firecracker is a virtual machine monitor that runs microVMs. It isolates untrusted code by running a host process for each VM. Each virtual CPU has a host thread that enters the kernel through KVM_RUN. While that thread remains in the system call, the kernel stores its userspace registers in a structure called pt_regs. Those registers include the instruction pointer and stack pointer that determine where execution resumes. PWN Research targeted that saved frame.
The team had access to selected host physical memory through a guest mapping. To use it, the researchers had to find the Firecracker process, locate callable code in that process, and find the register frame for the active vCPU thread. The chain has four stages.
From guest page to host memory
The researchers placed a recognizable byte pattern, called a nonce, in a guest page. The first resolver took that page's guest physical address and its contents. It searched host physical ranges covered by the memory primitive for candidate EPT roots. For each candidate, it walked Extended Page Tables to a physical page and checked that page for the nonce. The nonce check connected a proposed translation to memory the researchers controlled. The produced two candidates; validation of nested page tables reduced them to one EPT root. Walking that root produced guest_page_hpa, the host physical address of the guest page.
Finding the Firecracker process
Firecracker maps guest memory into its own address space. The reverse mapper searched native host page tables for a mapping of guest_page_hpa. A normal page table walk starts with a virtual address and produces a physical address. The researchers searched for a mapping to a physical page they knew, then recovered the virtual address and page table root. The check ran in both directions: it walked the recovered page tables back to the physical page and checked the nonce again.
The reverse mapper returned one validated address space. The researchers retained its root as host_pgd. The resolver identified an ELF image in those mappings and checked a known byte sequence in Firecracker's write wrapper. ASLR changes where an executable loads. The difference between an address in the ELF image and its runtime address is the load bias. The mapper recovered that bias and returned it as firecracker_base. With host_pgd and firecracker_base, the researchers could locate code in the running process, translate its virtual address to host physical memory, and compare bytes with the expected binary. They checked three locations: the write wrapper, the continuation after the KVM ioctl, and a short xor eax,eax; ret sequence.
Locating the live vCPU frame
The frame finder used host_pgd and firecracker_base. It looked for a pt_regs frame whose saved instruction pointer matched the validated Firecracker ioctl continuation. An address match alone could pick up stale stack contents, so the candidate had to satisfy several checks. The syscall identity and in-progress state matched an active ioctl. The ioctl request was KVM_RUN. The file descriptor fell within the helper's expected range. The instruction pointer matched the validated continuation. The stack pointer translated through the recovered host PGD. Segment selectors and flags described a valid return to userspace. The caller return address fell inside the validated Firecracker text mapping.
The left one candidate. Its location became frame_hpa. Before changing memory, the helper repeated the code signature, frame, and stack checks.
Redirecting the return from KVM
The researchers chose a simple payload: make Firecracker write a recognizable string to its own standard error. The string was N8V23M2 followed by a newline. It occupies eight bytes and fits in one stack word. The desired call was write with file descriptor two, the marker buffer, and length eight.
The buffer pointer had to refer to the string in Firecracker's address space, so the researchers stored the string on its private userspace stack. They saved three stack words before modifying them. One held the string; the other two held return addresses for the temporary call sequence. They then changed the saved register frame:
RIP pointed to Firecracker's write wrapper.
RSI held the virtual address of the marker on Firecracker's stack.
RSP pointed to the temporary return sequence.
A successful write of eight bytes returns eight, while a successful KVM_RUN call returns zero. The researchers placed the address of xor eax,eax; ret first in the return sequence. It clears the return value before the second address returns execution to Firecracker's original ioctl continuation. The control flow was:
KVM_RUN returns to userspace, Firecracker's write wrapper emits the marker, xor eax,eax; ret sets the return value to zero, and execution resumes at the original ioctl continuation.
With the stack and saved registers prepared, the guest wrote one byte to its serial port. That operation caused the vCPU thread to return from KVM_RUN. The kernel restored the modified registers, and Firecracker entered the write wrapper with the supplied arguments. The wrapper emitted the marker, the return sequence cleared eax, and the thread rejoined its original execution path. After control returned to the guest, the helper restored all three stack words.
Execution and recovery
The host runner captured Firecracker's standard error apart from the guest. The complete output was N8V23M2. The capture contained eight bytes, including the final newline. Firecracker remained running, guest SSH stayed responsive, and the helper had restored the three temporary stack words. The researchers checked recovery with a fresh pass that made no memory changes. It received the same frame address and repeated the register, code, and stack checks after the trigger. The checks passed, and it found no stale marker in the temporary stack location.
Root execution on the host
The existing write wrapper gave a compact proof of that control. Extending it to other calls would require choosing code and arguments compatible with the process's mappings and syscall policy. The configuration used here had no jailer. Firecracker's production containment includes dropping privileges and restricting the process through namespaces and seccomp. A deployment using those controls requires a separate assessment of the privileges and resources available after compromising its virtual machine monitor.
What the chain demonstrates
The address discovery lets the exploit follow the running instance. The EPT resolver connects a guest page to host memory. The reverse mapper recovers the host address space. The image mapper locates Firecracker under ASLR. The frame finder identifies the vCPU's saved state. Adapting the final stage to another build requires validating that binary's code signatures and return path.
The guest used access to host memory to take over the thread running the VM itself. A serial write supplied the trigger, and the userspace operation belonged to the guest.
Captured resolver values
The preserved execution record includes these values:
The records use run ID eventpath-v23-0907self02 and boot ID 2b3cd5ac-2311-427f-a50a-6a79ecb8daa7. These identifiers connect the resolver records, host capture, and validation after restoration. The release bundle contains the final helper source, JSONL resolver records, host capture, recovery manifest, four preserved read-only resolver binaries with provenance, and SHA-256 manifests.
The final helper accepts the PGD, load bias, and frame HPA produced by the resolvers. Its checks cover the run identifier, address ranges, code signatures, saved registers, and stack geometry. Its dry-run mode performs validation without writing memory.
Source : Firecracker VM Escape: PwnEscape Part 2. , by PWN Research, Paulos Yibelo , PWN.AI
The full story
This article is one source in a clustered incident — the cluster page carries the summary, timeline and every other outlet covering it.
