Bug 2494105

Summary: CVE-2026-57966 spice-vdagent: Path traversal in file transfer via unsanitized filename [fedora-all]
Product: [Fedora] Fedora Reporter: Mauro Matteo Cascella <mcascell>
Component: spice-vdagentAssignee: Christophe Fergeau <cfergeau>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: cfergeau, hans, marcandre.lureau
Target Milestone: ---Keywords: Security, SecurityTracking
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: {"flaws": ["1eea3a03-45a6-4e77-aa98-9f2e41993862"]}
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2493582    

Description Mauro Matteo Cascella 2026-06-29 07:56:28 UTC
Disclaimer: Community trackers are created by Red Hat Product Security team on a best effort basis. Package maintainers are required to ascertain if the flaw indeed affects their package, before starting the update process.

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.