Skip to content
KitploitKITPLOIT
도구익스플로잇블로그
Log in
제출
도구익스플로잇블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

피드문의개인정보© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
cve-2026-12080-qemu-guest-agent-authorized-keys — Technical writeup of CVE-2026-12080: local privilege escalation in the QEMU Guest Agent (qga) guest-ssh-add-authorized-keys handler via symlink following. | Kitploit
도구/GitHubGitHub/m8seven/cve-2026-12080-qemu-guest-agent-authorized-keys
Privilege EscalationVulnerability AnalysisExploitationSecurity VirtualizationPapers & ResearchLearning & Education
GitHubm8seven/cve-2026-12080-qemu-guest-agent-authorized-keys

cve-2026-12080-qemu-guest-agent-authorized-keys

Technical writeup of CVE-2026-12080: local privilege escalation in the QEMU Guest Agent (qga) guest-ssh-add-authorized-keys handler via symlink following.

저장소 보기
29일 전아직 검토되지 않음
공유
요청한 언어로 콘텐츠를 사용할 수 없습니다. 영어 버전을 표시합니다.

CVE-2026-12080: QEMU Guest Agent guest-ssh-add-authorized-keys local privilege escalation

Local privilege escalation in the QEMU Guest Agent (qga) via symlink following in the guest-ssh-add-authorized-keys command handler. An unprivileged user inside the guest pre-stages a symlink in a target account's ~/.ssh, and the agent, running as root, follows it while creating and chowning authorized_keys, handing ownership of a root-controlled path to the unprivileged user.

This is a writeup of a vulnerability I reported and which was assigned CVE-2026-12080 by Red Hat Product Security (the CNA). It is published here as a technical record. The issue belongs to the same symlink-following authorized_keys class as a number of sibling findings in other agents; it is reported as that accepted class in a handler it had not yet been fixed in, not as a novel root cause.

Official references

  • Red Hat CVE record: https://access.redhat.com/security/cve/CVE-2026-12080
  • Red Hat Bugzilla flaw: https://bugzilla.redhat.com/show_bug.cgi?id=2499603
  • QEMU GitLab work item: https://gitlab.com/qemu-project/qemu/-/work_items/3929
  • Affected source: https://gitlab.com/qemu-project/qemu/-/blob/master/qga/commands-posix-ssh.c

The fix carries Reported-by: Valentino Paulon and Fixes: CVE-2026-12080.

CVECVE-2026-12080
ComponentQEMU qga/commands-posix-ssh.c, guest-ssh-add-authorized-keys handler (and the sibling remove/get handlers)
TypeElevation of Privilege (local). CWE-59 / CWE-61 (link following) with improper ownership management
CVSS7.3 (High) — CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
Public2026-07-20
Reported byValentino Paulon

Summary

The guest agent exposes guest-ssh-add-authorized-keys, which writes a target user's ~/.ssh/authorized_keys. The handler builds the .ssh directory and the authorized_keys path from the target user's passwd home and then operates on those paths by name, as root, with no privilege drop:

  • it creates the directory and file along a path the target user owns and controls, following any symlink placed there, and
  • it changes ownership with a path-based chown that follows symlinks.

Because no seteuid/setegid drop is performed and the operations are name-based rather than performed relative to a safely-opened, symlink-refusing descriptor, an unprivileged user who controls the target home can redirect the agent's privileged create/chown onto a root-controlled path. Both exploitation variants below were reproduced end to end against qga 6.2.0 with the command enabled in its default configuration.

Two variants

Both confirmed end to end on a throwaway VM. victim is an unprivileged local user; the agent runs as root and the command is triggered exactly as a host operator would trigger it. Canaries stand in for sensitive root targets.

Variant A — deterministic directory-symlink bypass. The unprivileged user replaces (or pre-creates) ~/.ssh as a symlink to an existing root-owned directory. When the handler creates/chowns along that path, the root-owned directory's ownership is transferred to the unprivileged user. Deterministic, no race.

Variant B — TOCTOU file-symlink race. With ~/.ssh a normal directory, the user wins a rename-then-symlink race in the window between the handler's check and its create/chown of authorized_keys, so a new root-path file is created and chowned to the user. Reproduced by winning the race on a second iteration.

In both cases the unprivileged user ends up owning a root-controlled path and escalates by the standard follow-on (for example a new file under /etc/cron.d or /etc/sudoers.d, or ownership of a directory under /etc), where the user, now the owner, rewrites the target.

Root cause

The three guest-ssh-*-authorized-keys handlers performed their filesystem work as root, on attacker-reachable paths, by name:

  • directory and file creation along ~/.ssh without refusing a pre-existing symlink (no O_NOFOLLOW/O_EXCL open operated on through the resulting descriptor);
  • ownership changes with path-based chown rather than lchown/fchown on a safely-opened descriptor;
  • no effective-UID/GID drop to the target user around the I/O, so every operation ran with full root authority on a path the unprivileged user controlled.

The check-and-then-act structure on a name additionally left a TOCTOU window (Variant B) even where a single operation looked guarded.

Fix

The accepted fix changes the privilege model of all three handlers rather than patching one call site. A helper (set_privileges_to_user(), with an EffectiveUserInfo carrier using g_auto cleanup) drops the effective GID and UID to the target user — initgroups + setegid + seteuid, in that order — before any filesystem I/O on ~/.ssh, and restores them automatically on every exit path through the auto-cleanup, so the early-return paths in remove/get cannot leave the daemon running as the wrong user. The restore asserts success (seteuid/setegid back to root), aborting — and letting the service manager restart the agent — if it ever failed. With the effective identity dropped before the I/O, both variants fail closed: the create hits EACCES and the chown hits EPERM as the unprivileged user. The fix was merged upstream and backported to the stable branches 10.0.14, 11.0.5 and 11.1.2.

Impact and honest preconditions

  • Elevation of privilege from an unprivileged local user inside the guest to root inside the same guest.
  • Conditional on the guest-ssh-add-authorized-keys command being invoked for the victim's account by the host/operator (the normal use of the command). The unprivileged user only pre-stages the symlink in a home they already control; they do not trigger the command themselves. This is the operator/host-trusted trigger model, reflected in the CVSS UI:R, and it is stated explicitly rather than rated as self-triggered. The upstream maintainers were appropriately cautious about real-world exploitability for exactly this reason; the precondition is not overstated here.

Disclosure timeline

DateEvent
2026-06-07Reported to [email protected], with both variants reproduced end to end on qga 6.2.0
2026-06-12CVE-2026-12080 assigned by Red Hat Product Security; the qga maintainer confirmed the issue
2026-07-20CVE-2026-12080 published
2026-09Fix merged upstream and backported to stable 10.0.14 / 11.0.5 / 11.1.2

License

MIT. See LICENSE.

도구 다운로드

인기

모두 보기 →

커뮤니티에서 가장 많이 사용되는 도구를 찾아보세요.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 궁극의 OSINT 툴킷: 조사 그래프, 신뢰도 점수 산정, 별칭 패밀리, 지도, 타임라인 및 보고서. 49개 모듈, 400개 이상 사이트, API 키 불필요.

    1.0k
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    # GhostLock 원탭 실행 앱 (CVE-2026-43499)

    593
  • 3

    looking-glass

    anonghosty/looking-glass

    Shadowserver 보고서를 MongoDB로 수집하고 이를 대화형 지도, 분석, 발견 사항, 권고 및 경영진 대시보드로 재생하는 CSIRT 플랫폼입니다.

    371
  • 4

    redforge

    cybersecurity91/redforge

    브라우저 측 레드 팀 툴킷으로, 정찰, 페이로드 생성, 자격 증명 공격, 암호화, 인코딩 및 참여 보고를 위한 102개의 오프라인 도구를 제공합니다.

    336
  • 5

    ARTEX

    baarai/artex

    LLM 멀티 에이전트 자율 침투 테스트 플랫폼으로, 플래너/워커 에이전트, 자산 및 탐색 그래프, MITM 트래픽 기록, 취약점 재테스트 기능을 제공합니다.

    326
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    AI 네이티브 사이버보안을 위한 행동 체계—의도가 통제된 실행이 되고, 증거가 운영 메모리가 되며, 모든 운영이 다음 운영을 개선하는 곳.

    322

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →