Executive brief
libvirt is virtualization management software used to control and monitor virtual machines. A flaw in libvirt's TPM (Trusted Platform Module) initialization code allows a local attacker to exploit a symlink vulnerability, causing the system to change file ownership of arbitrary files to an unprivileged account. This could allow an attacker to modify system files or escalate privileges on systems where SELinux is not properly enforced.
Technical details
The vulnerability is a symlink-following flaw (CWE-61) in the qemuTPMEmulatorPrepareHost() function within libvirt. The function performs a path-based chown() operation on the swtpm logfile without validating whether the path is a symbolic link. A local attacker with access to the swtpm account can replace the logfile with a symlink pointing to an arbitrary file, causing libvirtd (running as root) to change the ownership of that target file to the swtpm user. Attack requires local access and low privileges (swtpm account access), with no user interaction needed. On Red Hat Enterprise Linux systems with SELinux in enforcing mode (default), the practical impact is significantly reduced due to SELinux confinement of the swtpm process, which restricts symlink creation and limits ownership-change scope.
Affected products
- libvirt libvirt <UNKNOWN>
Timeline
- 2026-09-11: disclosed
- 2026-09-11: advisory: CVE-2026-77159 published