Severity by source
AV:L/AC:H/PR:L/UI:R/S:U/C:N/I:H/A:L
Local-only TOCTOU race (AV:L/AC:H), requires existing session process (PR:L) and file transfer interaction (UI:R); writes cause integrity harm but no confidentiality loss.
Primary rating from Vendor (github).
CVSS VectorVendor: github
CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:N/I:H/A:L
Lifecycle Timeline
2DescriptionCVE.org
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.
AnalysisAI
Arbitrary file write in kitty terminal versions prior to 0.47.2 allows a child process running inside a kitty session to redirect writes to attacker-controlled filesystem paths. The root cause is a missing O_NOFOLLOW flag in the os.open() call within kitty's file transmission protocol: between the initial symlink validation stat-check and the actual file open, an attacker can insert a symlink, causing the write to follow it to an arbitrary destination - a classic TOCTOU race. No public exploit code exists and EPSS sits at 0.01% (1st percentile), indicating no observed exploitation; however, successful exploitation enables high-integrity-impact file overwrites that can facilitate local privilege escalation. Version 0.47.2 resolves the issue.
Technical ContextAI
CWE-59 (Improper Link Resolution Before File Access, also known as 'Link Following') describes vulnerabilities where software resolves a path - confirming it is safe - then, before acting on it, allows an attacker to substitute a symbolic link that redirects the operation elsewhere. In kitty, the file transmission protocol is a built-in feature enabling file transfers between the terminal and the host filesystem. The vulnerable code path performs a stat() call to inspect the target path, then later calls os.open() to create or write the file. Because os.open() is invoked without the O_NOFOLLOW flag, the kernel will transparently follow any symlink present at the target path at the moment of the open - even if that symlink did not exist during the prior stat check. A racing attacker-controlled child process can exploit this window to redirect the write to any filesystem path writable by the terminal process's effective UID. No CPE strings were provided in the input data; the affected component is the kitty terminal emulator by Kovid Goyal prior to version 0.47.2.
RemediationAI
The primary fix is to upgrade kitty to version 0.47.2 or later, which corrects the os.open() call to include the O_NOFOLLOW flag, preventing symlink traversal at file creation time. Upgrade instructions and release artifacts are available via the kitty project on GitHub; the security advisory is at https://github.com/kovidgoyal/kitty/security/advisories/GHSA-q446-x7q6-vcxh. If an immediate upgrade is not possible, a compensating control is to disable or restrict use of kitty's file transmission protocol feature in environments where untrusted or semi-trusted child processes run inside kitty sessions - for example, in shared or multi-user systems. Note that disabling the file transmission feature will break legitimate use cases such as file transfers via the kitten CLI. No alternative workaround fully eliminates the race window without the upstream O_NOFOLLOW fix.
The SSH transport protocol with certain OpenSSH extensions, found in OpenSSH before 9.6 and other products, allows remot
Stack-based buffer overflow in the SCP command-line utility in PuTTY before 0.67 and KiTTY 0.66.6.3 and earlier allows r
The Graphics Protocol feature in graphics.c in kitty before 0.19.3 allows remote attackers to execute arbitrary code bec
KiTTY versions 0.76.1.13 and before is vulnerable to command injection via the filename variable, occurs due to insuffic
KiTTY versions 0.76.1.13 and before is vulnerable to a stack-based buffer overflow via the username, occurs due to insuf
KiTTY versions 0.76.1.13 and before is vulnerable to a stack-based buffer overflow via the hostname, occurs due to insuf
In Kitty before 0.26.2, insufficient validation in the desktop notification escape sequence can lead to arbitrary code e
Heap memory corruption in Kitty cross-platform GPU terminal emulator (versions 0.46.2 and below) allows remote attackers
Heap buffer overflow in Kitty terminal versions 0.46.2 and below allows any process able to write to the terminal's stan
open_actions.py in kitty before 0.41.0 does not ask for user confirmation before running a local executable file that ma
Remote code execution in Kitty terminal emulator versions prior to 0.47.0 allows any process or remote peer that can wri
Command injection in Kitty cross-platform GPU terminal emulator versions prior to 0.47.0 allows remote attackers to exec
Same weakness CWE-59 – Improper Link Resolution Before File Access
View allSame technique Privilege Escalation
View allVendor StatusVendor
SUSE
Severity: ModerateShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-36556