REDHAT-BUG-2493582: Path Traversal
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 gbuildfilename() without any sanitization (file-xfers.c:138-139, 190). The gbuildfilename() function has documented behavior where if the second argument is an absolute path (starts with '/'), the first argument (savedir) 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 savedir 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.
Affected Software
Event History
Frequently Asked Questions
What is the severity of REDHAT-BUG-2493582?
The severity of REDHAT-BUG-2493582 is classified as medium (4).
How do I fix REDHAT-BUG-2493582?
To fix REDHAT-BUG-2493582, ensure that the file transfer metadata received from the SPICE host is properly sanitized before it is processed.
What vulnerability type does REDHAT-BUG-2493582 represent?
REDHAT-BUG-2493582 represents a path traversal vulnerability in the spice-vdagent software.
What function is involved in the vulnerability REDHAT-BUG-2493582?
The g_build_filename() function is involved in the vulnerability described by REDHAT-BUG-2493582.
In which software component is the REDHAT-BUG-2493582 vulnerability found?
The vulnerability REDHAT-BUG-2493582 is found in the spice-vdagent component.