Fedora Account System
Red Hat Associate
Red Hat Customer
A path traversal vulnerability was found in spice-vdagent. In src/vdagent/file-xfers.c, the filename received from the SPICE host in file transfer metadata is used directly in g_build_filename() without any sanitization (file-xfers.c:138-139, 190). The g_build_filename() function has documented behavior where if the second argument is an absolute path (starts with '/'), the first argument (save_dir) is silently discarded. Additionally, '..' components in relative paths are not stripped, enabling directory traversal. This allows a malicious SPICE host to write arbitrary files at arbitrary paths on the guest filesystem, with the privileges of the spice-vdagent process (typically the logged-in user). Note: this is distinct from CVE-2017-15108, which was about unescaped save_dir passed to system() (command injection, CWE-78). This finding concerns the file name parameter not being sanitized for path traversal (CWE-22) — different input variable, different vulnerability class. Exploitation requires a malicious or compromised SPICE host.