Firecracker is designed to isolate untrusted code within micro VMs, but researchers have escaped it to achieve root code execution on the host. By analyzing how Firecracker saves registers and resumes execution after KVM, the team identified a vulnerability allowing them to hijack a live thread. Using a host memory primitive from Part 1, they located the Firecracker process in memory and modified saved registers to redirect execution upon return from KVM_RUN. The guest then restored temporary stack changes, allowing Firecracker to continue running while the VM remained accessible via SSH. This exploit demonstrates CVE-2026-99999 on a Firecracker setup by manipulating the vCPU thread's return path.
The attack began by identifying a controlled guest page on the host using Extended Page Tables (EPT). A nonce pattern was placed in a guest page, and the resolver searched host physical memory for EPT roots that translated the guest address to the controlled page. After validating candidates, the correct EPT root was found, revealing the host physical address of the guest page. This provided a recognizable object in host memory to locate the Firecracker process.
Next, the team mapped the guest page back to the Firecracker process by recovering its Page Global Directory (PGD). Firecracker maps guest memory into its address space, allowing reverse translation from physical to virtual addresses. By walking the process's page tables, they identified the active vCPU thread and its saved register frame in pt_regs. Modifying the instruction and stack pointers in this frame allowed them to execute arbitrary code when the thread returned to userspace. The exploit successfully took over a live Firecracker thread from within the guest.
Source: Hacker News · Summarized by HeadlinesBriefing