CVE-2026-13318: KubeVirt SSRF via Untrusted Guest IP in Port-Forward Handler
KubeVirt's port-forward feature contains a server-side request forgery (SSRF) vulnerability that allows an attacker to establish unauthorized network connections from the virt-api component to internal or external systems. The flaw stems from virt-api trusting the IP address reported by a guest VM without validation. An attacker with permissions to create VMs can exploit this by configuring a malicious guest agent to report an arbitrary IP address, then requesting a port-forward connection that tunnels traffic through virt-api's privileged network position, potentially bypassing network isolation controls.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 6.4 MEDIUM · CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
- Weaknesses (CWE)
- CWE-918
- Affected products
- 2 configuration(s)
- Published / Modified
- 2026-06-26 / 2026-07-06
NVD description (verbatim)
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.
2 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
The vulnerability exists in KubeVirt's virt-api port-forward handler, which processes port-forward requests to VirtualMachineInstance (VMI) objects. The handler retrieves the target IP address from vmi.Status.Interfaces[0].IP—a field populated by the QEMU guest agent running inside the VM—and passes it directly to net.Dial() without any validation or sanitization. For VMs using non-masquerade network modes (bridge or secondary-only), this IP address is fully under the control of the VM owner. An attacker with kubevirt.io:edit permissions can create a VM with a modified guest agent that spoofs an arbitrary IP address, then issue port-forward requests to establish a bidirectional TCP tunnel from virt-api's cluster-internal network context to any routable destination, effectively sidestepping NetworkPolicy enforcement.
Business impact
This vulnerability enables lateral movement within Kubernetes clusters running KubeVirt. An insider or compromised account with VM creation permissions can use port-forwarding as a covert channel to reach internal services, databases, or cloud infrastructure that would normally be protected by network policies. The impact is heightened in multi-tenant or restricted-access environments where NetworkPolicy is relied upon to enforce network segmentation. While the vulnerability requires authentication (kubevirt.io:edit), the ease of exploitation and the breadth of potential targets make it a significant security concern for organizations using KubeVirt for virtualization workloads.
Affected systems
KubeVirt (upstream project) and Red Hat OpenShift Virtualization are affected. The vulnerability applies to deployments where virt-api is exposed and VMs use non-masquerade network bindings. Masquerade-mode networking may provide some protection because the guest agent cannot control the IP address in that configuration, but non-masquerade modes (bridge, SR-IOV, secondary networks) are directly vulnerable. The exact affected versions should be verified against Red Hat and KubeVirt advisories.
Exploitability
Exploitation requires authentication: the attacker must have kubevirt.io:edit permissions to create or modify VMs. This elevates the barrier from unauthenticated attacks but does not eliminate risk in environments where such permissions are granted to developers, operators, or service accounts with broad access. The attack itself is straightforward—create a VM with a spoofed guest agent, then issue a port-forward request—and requires no special tools or knowledge of internal infrastructure. The CVSS score of 6.4 (MEDIUM) reflects the requirement for authenticated access and the indirect impact on confidentiality and integrity, rather than availability or privilege escalation.
Remediation
Organizations using KubeVirt should apply available security patches as soon as they become available. Upstream KubeVirt and Red Hat OpenShift Virtualization advisories will contain specific patch versions. Until patches are applied, mitigation strategies include: (1) restricting kubevirt.io:edit permissions to trusted users and service accounts; (2) enabling RBAC to limit which identities can create or modify VMs; (3) enforcing NetworkPolicy to restrict outbound traffic from virt-api pods, recognizing that this may conflict with legitimate port-forward use cases; and (4) monitoring port-forward requests for suspicious destination IPs outside expected ranges.
Patch guidance
Verify the latest security advisories from the KubeVirt project and Red Hat for patched versions. The fix will likely involve validating the target IP address against a whitelist, restricting it to the pod's own network range, or requiring explicit authorization for port-forward destinations. Apply patches to all virt-api components in your Kubernetes cluster. Test port-forward functionality in a non-production environment to ensure the patch does not break legitimate VM access workflows.
Detection guidance
Monitor virt-api logs and audit records for port-forward requests with unusual destination IP addresses, particularly those outside your expected VM or cluster subnets. Track calls to net.Dial() with attacker-controlled parameters if your environment supports eBPF or kernel-level tracing. Review RBAC audit logs for grants of kubevirt.io:edit permissions and cross-reference VM creation events with subsequent port-forward attempts. Network monitoring tools may detect outbound traffic from virt-api pods to unexpected destinations. In Kubernetes, examine vmi.Status.Interfaces[0].IP values for IPs that do not match the underlying QEMU instance or guest OS configuration.
Why prioritize this
While the CVSS score is MEDIUM, this vulnerability merits prompt attention because: (1) it enables SSRF from a privileged cluster-internal position, bypassing NetworkPolicy controls; (2) exploitation is straightforward once an attacker has VM creation permissions; (3) the impact—unauthorized access to internal services—can be severe in multi-tenant or restricted-access environments; and (4) the vulnerability may not be immediately detected by standard network monitoring. Prioritize patching in clusters with high-sensitivity workloads or where VM access is granted to less-trusted users.
Risk score, explained
CVE-2026-13318 is scored 6.4 (MEDIUM) on CVSS 3.1 because it requires authenticated access (PR:L), has low attack complexity (AC:L), is network-accessible (AV:N), and impacts the confidentiality and integrity of systems reachable from virt-api (C:L/I:L), but not availability (A:N). The score does not increase to HIGH because a successful exploit does not grant the attacker higher privileges on the cluster itself—rather, it grants access to systems accessible from virt-api's network position. Organizations relying on NetworkPolicy for isolation should view this as a higher-severity finding in their risk context.
Frequently asked questions
What is SSRF and why is it dangerous in a Kubernetes context?
Server-Side Request Forgery (SSRF) allows an attacker to make arbitrary network requests on behalf of a vulnerable service. In Kubernetes, virt-api runs with cluster-internal network access and may be able to reach services, APIs, and metadata servers (e.g., cloud provider endpoints) that are inaccessible to external users. An SSRF in virt-api can thus become a stepping stone for lateral movement or credential theft.
Do I need to patch if my VMs use masquerade-mode networking?
Masquerade mode is safer because the guest agent does not control the IP address reported to virt-api—instead, the host network configuration is used. However, you should still apply the patch to defense-in-depth, and verify your VM network configuration to confirm masquerade is actually in use. Non-masquerade modes (bridge, SR-IOV, secondary networks) are directly vulnerable.
Can NetworkPolicy protect me from this vulnerability?
NetworkPolicy can restrict outbound traffic from virt-api pods, but this may conflict with legitimate port-forward use cases or other virt-api functions. NetworkPolicy alone does not prevent the vulnerability—the fix must come from validating the target IP in virt-api code. Use NetworkPolicy as a complementary control to limit blast radius if a compromise occurs, not as a replacement for patching.
What if I cannot patch immediately?
Restrict kubevirt.io:edit permissions to only highly trusted users and service accounts. Monitor virt-api logs and audit records for unusual port-forward requests. Implement NetworkPolicy to limit virt-api's outbound connectivity, and conduct a review of your VM creation and management workflows to ensure no unnecessary VM creation permissions are in place.
This analysis is provided for informational purposes and reflects the state of vulnerability information as of the publication date. SEC.co does not independently verify patch version numbers, KEV status, or vendor advisory content—users must consult official Red Hat and KubeVirt security advisories for authoritative guidance. CVSS scores and vectors are sourced from the provided data and do not constitute endorsement or modification by SEC.co. Organizations should assess risk in their specific environment and apply patches according to their change management and testing procedures. Source: NVD (public-domain), retrieved 2026-08-04. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-13316MEDIUMForeman & Red Hat Satellite SSRF Cloud Metadata Vulnerability
- CVE-2026-12992HIGHApicurio Registry WSDL SSRF Vulnerability - High Risk
- CVE-2026-42965HIGHOpenShift Router SSRF via FQDN EndpointSlice
- CVE-2026-13208MEDIUMKubeVirt virt-handler gRPC Identity Validation Flaw
- CVE-2026-13218MEDIUMKubeVirt Symlink Following in virt-handler Network Cache – Analysis & Patch Guidance
- CVE-2026-13434MEDIUMKubeVirt Network Annotation Injection Breaks Multi-Tenancy
- CVE-2026-13201HIGHKubeVirt Symlink Following in virt-handler Privilege Escalation
- CVE-2026-13322LOWKubeVirt Downward Metrics Memory Exhaustion (CWE-770)