Zapscape Vulnerability in Linux KVM Allows Guest-to-Host Escapes

A newly identified vulnerability in the Linux Kernel-based Virtual Machine (KVM), known as ‘Zapscape’ and tracked as CVE-2026-64561, poses a significant security risk by enabling attackers with kernel privileges inside a Level 1 (L1) guest virtual machine (VM) to execute code on the host system. This flaw is particularly concerning in environments where nested virtualization is accessible to untrusted guests.

The issue resides in KVM’s shadow memory management unit (MMU), which is responsible for managing shadow page tables used for nested guest memory translation. The vulnerability stems from a stale-root check ordering flaw in KVM’s shadow-MMU bookkeeping, leading to a use-after-free condition. During guest-triggered page fault handling, KVM can reclaim MMU pages and invalidate the shadow MMU root page still being used by the fault-handling path. Because the path does not check the root again, KVM can continue under the invalidated root.

Security researcher Hyunwoo Kim, who disclosed the vulnerability, demonstrated an exploit path that allows commands to be executed on the host with root privileges. Kim’s public proof-of-concept targets AMD nested SVM/NPT on Linux 7.1.3 and recommends running it under QEMU TCG for safe testing. It’s important to note that QEMU is not the vulnerable component; the flaw resides within the in-kernel KVM and can be triggered independently of QEMU’s emulation.

The National Vulnerability Database lists Linux versions 5.9 and later as affected until fixed stable releases, including 6.6.148, 6.12.101, 6.18.42, 7.1.6, and 7.2-rc5. Administrators managing KVM hosts that expose nested virtualization to untrusted guests are strongly advised to update to a fixed stable kernel or apply vendor-provided patches that backport the fix.

Given the widespread use of KVM in cloud environments and data centers, the discovery of Zapscape underscores the critical importance of maintaining up-to-date systems and promptly applying security patches. Organizations should assess their exposure to this vulnerability, especially if they utilize nested virtualization, and implement the necessary updates to safeguard their infrastructure against potential exploits.