REDHAT-BUG-2513065: High severity libvirt libvirt vulnerability

Published Aug 10, 2026
·
Updated

A symlink-following vulnerability was found in libvirt's virFileChownFiles() function in src/util/virfile.c. This function is called from src/qemu/qemutpm.c to change ownership of the swtpm state directory when starting a QEMU domain.

The function used stat() (via virFileIsRegular()) and chown(), both of which follow symlinks. A process running as the confined swtpm user (tss) can plant a symlink inside the swtpm state directory pointing to an arbitrary file. When the root-level libvirt daemon starts the next domain, it calls virFileChownFiles() which follows the symlink and chowns the target file to the tss user. This allows escalation from the swtpm sandbox to root-level file ownership control.

The fix replaces stat()/chown() with lstat()/lchown() to avoid following symlinks on the final path component.

Upstream fix: https://gitlab.com/libvirt/libvirt/-/commit/801160fd414ca2cc402bc01ead09b7ed4c3b8f5b

Affected Software

1 affected component
libvirt libvirt

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Patch 801160fd414ca2cc402bc01ead09b7ed4c3b8f5b
  2. Compensating control

    Prevent exploitation by ensuring the swtpm state directory contents cannot be manipulated by the confined swtpm (tss) user (e.g., ensure correct ownership/permissions and isolation so symlinks cannot be planted inside the swtpm state directory).

  3. Compensating control

    As a defense-in-depth measure, restrict libvirt/QEMU access so that an attacker cannot influence or replace paths under the swtpm state directory that are later processed by libvirt’s virFileChownFiles() during QEMU domain startup.

Event History

Aug 10, 2026
Data Sourced
via Red Hat·09:48 AM
DescriptionSeverityAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of REDHAT-BUG-2513065?

The severity of REDHAT-BUG-2513065 is classified as high with a score of 7.

2

What does REDHAT-BUG-2513065 affect?

REDHAT-BUG-2513065 affects the libvirt software, specifically the virFileChownFiles() function that deals with changing ownership of directories.

3

How do I fix REDHAT-BUG-2513065?

To fix REDHAT-BUG-2513065, update to the latest version of libvirt that addresses this symlink-following vulnerability.

4

What is the nature of the vulnerability in REDHAT-BUG-2513065?

REDHAT-BUG-2513065 is a symlink-following vulnerability that occurs in the virFileChownFiles() function of libvirt.

5

When was REDHAT-BUG-2513065 published?

REDHAT-BUG-2513065 was published on August 10, 2026.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203