Skip to main content
CVE-2026-99312: the nested virtualization box I never checked

This post is a translation of the Spanish original.

3 min read

CVE-2026-99312: the nested virtualization box I never checked

127 GB. That's how much of the host's physical memory a Terra Security researcher managed to read from an ordinary DigitalOcean droplet. The first thing the host gave back was the banner with its kernel version. Then everything else.

The bug is called CVE-2026-99312 and it lives in KVM, the hypervisor underneath a good chunk of the cloud and almost every home Proxmox box. But it has a very specific condition: it only affects hosts with AMD processors and nested virtualization enabled. It doesn't apply to Intel.

What exactly goes wrong

When a VM runs another VM inside it (nested virtualization), KVM has to keep track of which page tables each level uses. If an INIT signal resets the virtual CPU while it's inside the nested VM, KVM doesn't restore the pointer to the outer VM's tables. That pointer is left aimed at a page the host kernel has already freed. A textbook use-after-free, except the one exploiting it is sitting inside the virtual machine.

The origin is the curious part: according to Terra, the faulty code came in back in 2022 as part of the fix for another bug, CVE-2022-3344. A patch that brought its own hole and took four years to come to light.

Sources don't fully agree on what privileges the attacker needs inside the VM. What is clear is that we're talking about someone who already has a virtual machine on your host, not a network attack.

Why it matters more to me at home than in the cloud

DigitalOcean live-patched its whole fleet and told customers they didn't need to do anything. That's the upside of someone else running the hypervisor.

In a homelab, the hypervisor is you. And nested virtualization is one of those options you switch on one afternoon to try something (running Proxmox inside Proxmox, spinning up a Hyper-V lab, playing with containers that need KVM) and nobody ever looks at again. According to VirtFusion's guide, the kvm_amd module also ships with it enabled by default. I haven't been able to confirm that in a primary source, so better to check than to assume:

bash
cat /sys/module/kvm_amd/parameters/nested
# 1 or Y = enabled

If it's enabled, there are two paths. The proper one is to update to a fixed kernel (7.3.5, 6.18.64 or 6.12.118 onwards) and reboot the host, because the new kernel protects nothing until it boots. The stopgap is to put options kvm_amd nested=0 in /etc/modprobe.d/ and reload the module, which means stopping every VM. I haven't found an official Proxmox notice yet on when the fix reaches its standard kernel, so I have doubts about the timing here.

My take

Plenty of people will say this doesn't matter in a homelab: the VMs are yours and there's no hostile tenant. That's the best argument on the other side and it's partly right.

I don't fully buy it. A VM compromised through an exposed service, an image downloaded without a second look, or a test machine you leave open is exactly the kind of "tenant" you don't control. Isolation between VMs is what lets you sleep at night when one of them goes down. If that isolation depends on a checkbox you ticked two years ago and forgot about, the problem isn't the bug, it's the inventory.

For anyone studying systems, it's also a good reminder that the attack surface isn't just open ports: it's also the hypervisor features you've got switched on without using them.

How many of your hypervisor's options could you justify today if someone asked you why they're turned on?

Fuentes

David González Lombraña

Apuntes, laboratorio y proyectos de IA, Linux y redes.