Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessGain local execution inside kitty terminal
-
DeliveryTrigger file transmission protocol write to chosen path
-
ExploitRace to insert symlink at target path before os.open()
-
ExecutionFile write follows symlink to privileged destination
-
PersistOverwrite sensitive file (cron, sudoers, SSH keys)
-
ImpactAchieve local privilege escalation
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Symlink resolution safety
|
| Exploitation Conditions | Exploitation requires the attacker to have an active child process running inside a kitty terminal session on the target system - this implies local code execution as a low-privileged user (consistent with PR:L). The kitty file transmission protocol must be in use, either triggered by the attacker's own process or by racing a legitimate user-initiated transfer (consistent with UI:R). The attacker must win a kernel-level TOCTOU race between the stat() check and os.open() call, which introduces non-trivial timing constraints (consistent with AC:H). Exploitation is strictly local: no network vector exists. Limiting factors are: requirement for local process execution within a kitty session specifically, the high-complexity race window that reduces reliability, and the need for user interaction with the file transfer feature. Systems where kitty is not deployed or where untrusted processes cannot run inside kitty sessions are not exposed. |
| Impact | The CVSS 3.1 base score of 5.0 accurately reflects a moderate, contextually constrained risk. AV:L confirms local-only attack surface; AC:H reflects the inherent difficulty of reliably winning a TOCTOU race condition; PR:L requires the attacker to already have a running process within the kitty session; UI:R indicates user interaction (likely triggering a file transfer operation). The integrity impact is rated High (I:H), which is the most serious signal - arbitrary file overwrites can overwrite cron jobs, sudoers, SSH authorized_keys, or setuid binaries to achieve privilege escalation. Availability is Low (A:L) reflecting incidental file corruption risk; confidentiality is None (C:N). The EPSS score of 0.01% at the 1st percentile is consistent with the absence of any known exploit code and the technical difficulty of reliably timing a kernel-level race. This vulnerability is not in CISA KEV and no POC has been identified. Real-world risk is moderate: the attack requires a local foothold and precise timing, but the potential outcome (privilege escalation via arbitrary write) elevates operational severity above the base score might suggest in isolation. |
| Exploit ScenarioDerived | A malicious or compromised child process running inside a victim's kitty terminal session initiates a file transmission protocol write targeting a benign path. During the brief window between kitty's stat() validation and the os.open() call, the attacker process creates a symlink at that path pointing to a sensitive target such as /etc/cron.d/backdoor or ~/.ssh/authorized_keys. The write follows the symlink, overwriting the privileged file and enabling subsequent privilege escalation. No public exploit code exists at time of analysis; reliable exploitation requires precise race-condition timing. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jun 12, 2026
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.
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.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
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.
Know when Kitty gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
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
Lifecycle Timeline
1DescriptionCVE.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.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Privilege escalation occurs when an attacker leverages flaws in access control mechanisms to gain permissions beyond what they were originally granted.
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
EUVD-2026-36556
NVD
CVE.org
EPSS
Vulnrichment
GitHub
VulDB
Exploit-DB