CVE-2026-57966: Spice-vdagent: path traversal in file transfer via unsanitized filename
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.
Other sources
A path traversal vulnerability was found in spice-vdagent. This flaw allows a malicious or compromised SPICE host to write arbitrary files to any location on the guest operating system. This occurs because the filename provided by the SPICE host during file transfers is not properly sanitized before being used. An attacker could exploit this to write to sensitive locations with the privileges of the spice-vdagent process, typically the logged-in user. This issue requires the SPICE host to be untrusted or compromised for exploitation.
— MITRE
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2026-57966?
The severity of CVE-2026-57966 is medium with a score of 4.4.
How do I fix CVE-2026-57966?
To fix CVE-2026-57966, update spice-vdagent to the latest version where the path traversal vulnerability has been addressed.
What is the impact of CVE-2026-57966?
CVE-2026-57966 allows a malicious SPICE host to write arbitrary files to any location on the guest operating system.
What component is affected by CVE-2026-57966?
The component affected by CVE-2026-57966 is spice-vdagent.
Can CVE-2026-57966 lead to data compromise?
Yes, CVE-2026-57966 can potentially lead to data compromise as it allows unauthorized file access on the guest operating system.