CVE-2026-54055: Kitty Terminal File Transmission TOCTOU Privilege Escalation
Kitty, a popular GPU-accelerated terminal emulator, contains a local privilege escalation flaw in its file transmission protocol affecting versions before 0.47.2. A low-privileged user running a child process in the terminal can write files to arbitrary locations on the system by exploiting a race condition in how Kitty validates and creates files. An attacker would need local access and user interaction, but the window for exploitation is small and doesn't require special privileges to trigger.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 5.0 MEDIUM · CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:N/I:H/A:L
- Weaknesses (CWE)
- CWE-367, CWE-426, CWE-59
- Affected products
- 1 configuration(s)
- Published / Modified
- 2026-06-12 / 2026-06-17
NVD description (verbatim)
Kitty is a cross-platform GPU based terminal. In versions prior to 0.47.2, a local privilege escalation vulnerability exists in kitty's file transmission protocol where a child process running in the terminal can write to arbitrary files on the filesystem by exploiting a TOCTOU (Time-of-Check-Time-of-Use) race condition between symlink validation and file creation. The `os.open()` call used to create files does not use `O_NOFOLLOW`, allowing an attacker to create a symlink between the initial stat check and the actual file open, causing the write to follow the symlink to an arbitrary destination. Version 0.47.2 fixes the issue.
2 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
CVE-2026-54055 stems from a TOCTOU (Time-of-Check-Time-of-Use) race condition in Kitty's file transmission protocol implementation. The vulnerable code performs a stat() check on a target file path to validate it, but does not use the O_NOFOLLOW flag when subsequently calling os.open() to create the file. Between the validation check and the file creation, an attacker can replace a normal file with a symlink pointing to a sensitive system path or user file. When the subsequent open() call executes without O_NOFOLLOW, it follows the symlink, allowing writes to unintended locations. The vulnerability requires the attacker to have a child process running within the terminal session and depends on race condition timing. CWE-367 (TOCTOU), CWE-426 (Untrusted Search Path), and CWE-59 (Improper Link Resolution) are all contributing factors.
Business impact
The risk is primarily localized to individual systems where Kitty is actively used. A compromised or malicious child process (such as a script or application launched from the terminal) could overwrite configuration files, application binaries, or user data, potentially leading to privilege escalation within that user's context or system-wide damage if the process has elevated privileges. For organizations standardizing on Kitty for developer workstations or data center terminal access, unpatched instances represent a vector for lateral movement or persistence if an attacker gains initial shell access. The attack requires user interaction and local presence, limiting exploitation scope in most enterprise environments.
Affected systems
Kitty versions prior to 0.47.2 are vulnerable across all supported platforms (Linux, macOS, Windows). The vulnerability manifests in the file transmission protocol, so it affects any Kitty deployment that uses that feature. End users, development teams, and system administrators relying on Kitty for terminal access should verify their installed version and upgrade promptly. Organizations with centralized terminal solutions or bastion hosts running Kitty may face higher risk if those systems are accessed by untrusted users.
Exploitability
Exploitation requires local system access, active user session within Kitty, and the ability to execute code as the authenticated user. The attacker must trigger the file transmission protocol and execute the race condition within a narrow time window—this is technically feasible but not trivial. The CVSS score of 5.0 (Medium) reflects the high bar for triggering the vulnerability: local access, high complexity (AC:H due to race condition timing), low privileges required, and user interaction needed. No public exploit code is known to be in active circulation, and exploitation has not been added to the CISA Known Exploited Vulnerabilities (KEV) catalog.
Remediation
The fix is available in Kitty version 0.47.2, which adds the O_NOFOLLOW flag to the os.open() call, preventing symlink traversal during file creation. All users of earlier versions should upgrade immediately. For organizations unable to patch immediately, consider restricting Kitty's use to trusted environments, disabling the file transmission protocol if possible, or monitoring for suspicious symlink activity in directories where Kitty writes files.
Patch guidance
Upgrade Kitty to version 0.47.2 or later. On Linux distributions using package managers (apt, rpm, etc.), update via your standard patching workflow. macOS users should update via Homebrew or direct download from the official Kitty repository. Windows users should download the latest installer from the Kitty project. Verify the version after patching by running `kitty --version`. Organizations with pinned Kitty versions should schedule updates within their normal maintenance windows, prioritizing systems in sensitive environments (development infrastructure, shared bastion hosts).
Detection guidance
Monitor for failed file creation attempts followed by successful writes to unexpected locations, particularly in system directories or user home directories. Look for symlinks being created in temporary directories or in paths where Kitty's file transmission protocol typically operates. On systems using auditd or similar logging, inspect logs for stat() calls followed shortly by open() calls targeting different paths than the stat() validation. Check Kitty process logs for errors related to file transmission. Intrusion detection systems should flag unusual file creation patterns within terminal sessions, especially repeated race condition attempts.
Why prioritize this
This vulnerability merits timely attention but is not critical. The Medium CVSS score reflects the realistic difficulty of exploitation: race conditions are notoriously finicky, and the attacker must have local access and an active terminal session. However, for organizations where Kitty is widely deployed (especially among developers with access to sensitive systems), the ease of patching and the potential for privilege escalation within a user session justify prioritizing this update over lower-impact flaws. The lack of KEV status indicates real-world exploitation has not been documented at scale. Prioritize patching in multi-tenant environments, CI/CD infrastructure, and bastion hosts; single-developer machines can be addressed in the next regular update cycle if immediate patching poses operational risk.
Risk score, explained
CVSS 5.0 (Medium) is appropriate here. The attack vector is local-only (AV:L), reducing scope significantly compared to network vulnerabilities. Attack complexity is high (AC:H) because the race condition must be precisely timed. Privileges are low (PR:L), meaning any authenticated user can attempt exploitation. User interaction is required (UI:R), adding another barrier. The impact is integrity-focused (I:H) with some availability risk (A:L), but confidentiality is not affected (C:N). Together, these factors yield a moderate risk profile: real but not catastrophic, and entirely mitigable through patching.
Frequently asked questions
Can this vulnerability be exploited remotely?
No. This is a strictly local vulnerability. An attacker must have an active user account and session on the target system, plus the ability to run code within a Kitty terminal. Remote exploitation is not possible.
Do I need Kitty 0.47.2 or newer, or are earlier patch versions in the 0.47.x line also safe?
You must upgrade to 0.47.2 or later. Versions prior to 0.47.2 are vulnerable. If you are on 0.47.1 or earlier, patching is required. Always verify your installed version with `kitty --version`.
What does the file transmission protocol do, and do I need it?
Kitty's file transmission protocol allows efficient transfer of files between the terminal and remote systems over SSH or similar protocols. Many users and automation scripts rely on it. You should not disable it unless you have no use for the feature; instead, simply upgrade to the patched version.
How can I check if my Kitty installation is vulnerable?
Run `kitty --version` at the command line. If the version number is less than 0.47.2 (e.g., 0.47.0, 0.46.x, 0.45.x), your installation is vulnerable and requires immediate patching.
This analysis is provided for informational purposes and does not constitute legal or professional security advice. Always verify vulnerability details, patch availability, and compatibility with your environment before deploying updates. Patch version numbers and remediation guidance should be cross-referenced with official Kitty project advisories. Organizations should conduct their own risk assessment in the context of their unique infrastructure, threat model, and business requirements. SEC.co makes no warranty regarding the completeness or accuracy of this information beyond the date of publication. Source: NVD (public-domain), retrieved 2026-07-20. Analysis generated by SEC.co (claude-haiku-4-5).
Affected vendors
Related vulnerabilities
- CVE-2026-54056HIGHKitty Terminal Drag-and-Drop Symlink File Overwrite Vulnerability
- CVE-2025-46293MEDIUMmacOS Symlink Traversal Allows Unauthorized Data Access
- CVE-2025-59610MEDIUMQualcomm Memory Corruption via IOCTL API Version Mismatch – Patch Guidance
- CVE-2026-11322MEDIUMHermes WebUI Path Traversal Vulnerability – Credential Exposure Risk
- CVE-2026-11853MEDIUMDebusine Arbitrary Symlink Creation via Manifest Path Traversal
- CVE-2026-20454MEDIUMMediaTek geniezone Race Condition Privilege Escalation (CVSS 6.4)
- CVE-2026-28262MEDIUMDell iDRAC Tools Symlink Follow Information Tampering Vulnerability
- CVE-2026-40861MEDIUMApache Airflow Path Traversal – Log Directory Symlink and Directory Escape Vulnerability