CVE-2026-12080: Qemu-kvm: qemu-guest-agent: local privilege escalation via symlink attack in guest-ssh-add-authorized-keys
A flaw was found in the QEMU Guest Agent (qga). A local unprivileged user can exploit a vulnerability in the guest-ssh-add-authorized-keys command handler by manipulating symbolic links. This can occur either through a deterministic directory-symlink bypass or a Time-of-Check to Time-of-Use (TOCTOU) file-symlink race. Successful exploitation allows the attacker to gain ownership of arbitrary root-owned files or directories, leading to root access. This vulnerability requires an external management layer (e.g., libvirt) to trigger the affected code path.
Other sources
When qmpguestsshaddauthorizedkeys adds an SSH key for an existing local user, the agent (running as root) decides whether to create the user's .ssh directory with a symlink-following directory test, and then writes and chowns the authorizedkeys file using a plain chown (not lchown). A local unprivileged user who owns their home directory can pre-stage their .ssh directory (or the authorizedkeys file) as a symbolic link so that, when the host or operator triggers a key add for that user, the root agent follows the link and transfers ownership of an arbitrary root-owned file or directory to the unprivileged user, who can then rewrite it to obtain root.
Patch: https://patchew.org/QEMU/20260709105707.91209-1-kkostiuk@redhat.com/
— Red Hat
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2026-12080?
The severity of CVE-2026-12080 is rated high with a score of 7.3.
What is the risk associated with CVE-2026-12080?
CVE-2026-12080 has a risk score of 64.
How do I fix CVE-2026-12080?
To mitigate CVE-2026-12080, update to the latest version of the QEMU Guest Agent that includes the security fix.
Who can be affected by CVE-2026-12080?
CVE-2026-12080 can be exploited by local unprivileged users who have access to the guest-ssh-add-authorized-keys command.
What kind of attack does CVE-2026-12080 enable?
CVE-2026-12080 allows for local privilege escalation via a symlink attack.