CVE-2026-13318
Description
A server-side request forgery (SSRF) flaw was found in KubeVirt's virt-api port-forward handler. When processing a port-forward request to a VirtualMachineInstance (VMI), virt-api reads the target IP from vmi.Status.Interfaces[0].IP and passes it directly to net.Dial() without validation. For VMIs using non-masquerade network bindings (bridge or secondary-only), this IP is reported by the QEMU guest agent running inside the VM and is fully controllable by the VM owner. An attacker with kubevirt.io:edit permissions can create a VM with a modified guest agent that reports an arbitrary IP address, then request port-forward to establish a bidirectional TCP tunnel from virt-api's cluster-internal network position to any routable destination, bypassing NetworkPolicy isolation.
Summary dbcve.org
KubeVirt virt-api port-forward handler has an SSRF vulnerability where it directly uses the IP address from vmi.Status.Interfaces[0].IP (reported by QEMU guest agent) in a net.Dial() call without validation. For VMIs with non-masquerade network bindings, this IP is attacker-controllable, allowing an attacker with kubevirt.io:edit permissions to establish TCP tunnels from virt-api's cluster-internal network position to arbitrary destinations.
Mitigation
Implement strict IP address validation before net.Dial() to ensure the target IP is from an authorized range, or enforce NetworkPolicy to restrict virt-api egress, and limit kubevirt.io:edit permissions to trusted users.