CVE-2026-54055 Overview
CVE-2026-54055 is a local privilege escalation vulnerability in kitty, a cross-platform GPU-based terminal emulator developed by kovidgoyal. The flaw affects all versions prior to 0.47.2 and resides in kitty's file transmission protocol. A child process running inside the terminal can write to arbitrary files on the filesystem by exploiting a Time-of-Check-Time-of-Use (TOCTOU) race condition between symlink validation and file creation. The os.open() call used to create files does not include the O_NOFOLLOW flag, allowing an attacker to insert a symlink between the initial stat check and the actual file open. Version 0.47.2 resolves the issue.
Critical Impact
A local attacker controlling a child process inside a kitty terminal session can write to arbitrary filesystem locations accessible to the user running kitty, enabling local privilege escalation through file overwrite.
Affected Products
- kovidgoyal kitty terminal emulator versions prior to 0.47.2
- Linux, macOS, and other Unix-like platforms running vulnerable kitty builds
- Environments where untrusted child processes execute inside a kitty terminal session
Discovery Timeline
- 2026-06-12 - CVE-2026-54055 published to NVD
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2026-54055
Vulnerability Analysis
The vulnerability is classified under [CWE-59] Improper Link Resolution Before File Access (Link Following). Kitty implements a file transmission protocol that allows applications running inside the terminal to send files to the host system. Before writing a received file, kitty performs a stat check to validate that the target path does not contain a symbolic link pointing outside the intended destination directory. After the check passes, kitty calls os.open() to create or open the target file for writing.
The failure occurs because os.open() is invoked without the O_NOFOLLOW flag. The validation logic and the file open are not atomic operations. An attacker with local execution inside a kitty child process can race the protocol handler by replacing the validated path with a symlink between the stat call and the open call.
Root Cause
The root cause is a non-atomic file handling sequence in the file transmission protocol. The code path validates the destination using stat, then re-opens the path using os.open() without specifying O_NOFOLLOW. Because path resolution is performed twice on a mutable filesystem state, the kernel follows whichever symlink exists at the moment of the second resolution. This allows write operations to be redirected to attacker-chosen destinations such as user-owned configuration files, SSH authorized keys, or shell startup scripts.
Attack Vector
Exploitation requires local access and a child process running inside the kitty terminal. The attacker initiates a file transmission request through kitty's protocol, then runs a parallel process that monitors the target path. Immediately after kitty completes its validation but before it opens the file, the attacker replaces the path with a symlink pointing to a sensitive file owned by the kitty user. Kitty then writes attacker-controlled content to the symlink target. Successful exploitation requires winning the race window, which is reflected in the high attack complexity.
No public proof-of-concept code is available. See the GitHub Security Advisory GHSA-q446-x7q6-vcxh for vendor technical details.
Detection Methods for CVE-2026-54055
Indicators of Compromise
- Unexpected modifications to user-owned sensitive files such as ~/.ssh/authorized_keys, ~/.bashrc, or ~/.config/ entries shortly after kitty file transmission protocol activity.
- Presence of short-lived symlinks in directories targeted by kitty's file transmission protocol, created by non-kitty processes.
- Kitty process activity coinciding with rapid symlink, unlink, and rename syscalls from sibling processes.
Detection Strategies
- Audit filesystem syscalls using auditd or eBPF tooling to identify symlink and symlinkat calls targeting paths being written by kitty.
- Hunt for kitty versions earlier than 0.47.2 across managed endpoints using software inventory data.
- Correlate kitty process telemetry with writes to paths outside the user's expected download or transfer directory.
Monitoring Recommendations
- Monitor for installations of kitty below version 0.47.2 and flag them for upgrade.
- Log file integrity events on sensitive user dotfiles and SSH configuration files for users who run kitty interactively.
- Track child processes spawned within kitty sessions that issue rapid filesystem state changes against transfer destination paths.
How to Mitigate CVE-2026-54055
Immediate Actions Required
- Upgrade all kitty installations to version 0.47.2 or later on every system where the terminal is used.
- Avoid running untrusted binaries or scripts inside kitty sessions until the patched version is deployed.
- Disable or restrict use of kitty's file transmission protocol features on systems that cannot be patched immediately.
Patch Information
The vendor fixed the issue in kitty version 0.47.2. The patch adds O_NOFOLLOW semantics to the file creation path in the transmission protocol so that the kernel refuses to follow symlinks during the write operation. Details are published in the kovidgoyal/kitty GitHub Security Advisory GHSA-q446-x7q6-vcxh.
Workarounds
- Restrict kitty usage to trusted local sessions where no untrusted child processes are executed.
- Configure the destination directory for kitty file transfers to a path with restrictive permissions that prevent other processes from racing symlink creation.
- Where vendor packages are not yet updated, build kitty from source against the patched 0.47.2 release branch.
# Verify the installed kitty version and upgrade if vulnerable
kitty --version
# Example upgrade on systems using pip-managed kitty
pip install --upgrade "kitty>=0.47.2"
# Example upgrade on Arch Linux
sudo pacman -Syu kitty
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

