REDHAT-BUG-2482487: Path Traversal
A path traversal vulnerability was found in KubeVirt's virt-exportserver component. The VMExport directory endpoint uses Go's http.FileServer(http.Dir(mountPoint)) to serve filesystem PVC contents. Because http.Dir follows symbolic links, an attacker who can control files inside an exported filesystem PVC can place a symlink pointing outside the PVC mount root and read arbitrary files from the exporter pod's filesystem through the VMExport directory endpoint.
This vulnerability affects filesystem PVCs that do not have the cdi.kubevirt.io/storage.contentType annotation set to a KubeVirt content type. PVCs with KubeVirt content type receive raw/gzip export endpoints instead of the vulnerable directory endpoint. Namespaces with mixed workloads (pods and VMs) are more likely to have affected PVCs than namespaces hosting only KubeVirt VMs.
To exploit this vulnerability, an attacker must have namespace-level access sufficient to create or control the contents of a filesystem PVC, create a VirtualMachineExport resource for that PVC, and possess or obtain the VMExport token.
Affected Software
Event History
Frequently Asked Questions
What is the severity of REDHAT-BUG-2482487?
The severity of REDHAT-BUG-2482487 is high with a score of 7.
How do I fix REDHAT-BUG-2482487?
To fix REDHAT-BUG-2482487, ensure that proper input validation is implemented to prevent unauthorized access to the filesystem.
What type of vulnerability is REDHAT-BUG-2482487?
REDHAT-BUG-2482487 is categorized as a path traversal vulnerability.
What component is affected by REDHAT-BUG-2482487?
The vulnerability affects the virt-exportserver component of KubeVirt.
Can an attacker exploit REDHAT-BUG-2482487?
Yes, an attacker can exploit REDHAT-BUG-2482487 by controlling files in an exported filesystem to access unauthorized directories.