Impact
In Kitty terminal versions before 0.47.2, a child process used by the file transmission protocol can create files without the O_NOFOLLOW flag. A time‑of‑check to time‑of‑use race between the symlink validation and the os.open() call allows an attacker to replace the target of a symbolic link between checks. The resulting open follows the link, enabling writes to any file the attacker can target, effectively granting local privilege escalation. The weakness is a classic TOCTOU race (CWE‑367) combined with improper symlink handling (CWE‑426) and arbitrary file write (CWE‑59).
Affected Systems
The vulnerability affects the Kitty terminal (kovidgoyal:kitty) on all platforms supported by the project. Any installation running a version older than 0.47.2 is susceptible; all releases 0.47.2 and newer include the fix.
Risk and Exploitability
The CVSS score of 5.0 indicates a moderate severity. The EPSS score of <1% suggests low exploitation probability, and the vulnerability is not listed in the CISA KEV catalog. Exploitation requires a local user capable of executing code in the child process of Kitty, typically normal users with access to the terminal. An attacker can construct a symlink in a writable directory that the child process will follow during file creation, enabling writes to arbitrary system paths. The attack remains local and does not require elevated privileges to execute the exploit but results in privilege escalation once the file write succeeds.
OpenCVE Enrichment