# CVE-2026-54055: Kitty terminal arbitrary file write via symlink race condition

Source: https://junglewise.ai/threats/cve-2026-54055-kitty-terminal-arbitrary-file-write-via-symlink-race-condition  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-06-12. Updated: 2026-06-12  
License: CC BY 4.0 with a link back

CVE-2026-54055 · Severity: medium · CVSS 5 · Published 2026-06-12

Kitty is a popular cross-platform terminal emulator. A security flaw in its file transmission protocol allows a malicious program running inside the terminal to trick the user into overwriting sensitive files. While the user is prompted to approve a file transfer, an attacker can exploit a timing window to redirect that transfer to a different, unapproved file (like configuration or SSH keys), potentially leading to a full system compromise under the user's account.

## Quick answers

**Is CVE-2026-54055 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-54055 being exploited in the wild.

**How severe is CVE-2026-54055?** Medium severity, with a CVSS score of 5, published 12 June 2026.

**Which products and versions are affected?** kovidgoyal Kitty < 0.47.2.

**Is there a fix for CVE-2026-54055?** A patch was published on 2026-06-12: Fixed in version 0.47.2 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-54055 attacked?** It is attacked with local access, in a network appliance.

**Am I affected by CVE-2026-54055?** Check whether anything you run is named in the advisory. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

A TOCTOU race condition exists in `kitty/file_transmission.py` within the `DestFile` class. The application performs a symlink check using `os.stat` during initialization but fails to use the `O_NOFOLLOW` flag during the subsequent `os.open` call in the `write_data()` method. A malicious child process can create a symlink at the target path after the initial check but before the file is opened. This allows the process to bypass the user's file transfer confirmation and overwrite arbitrary files that the user has write permissions for. The vulnerability is addressed in version 0.47.2 by ensuring symlinks are not followed during the open operation.

## Affected products

- kovidgoyal Kitty < 0.47.2

## Timeline

- 2026-06-08: advisory: GitHub security advisory published by maintainer
- 2026-06-12: disclosed: CVE published to NVD
- 2026-06-12: patched: Fixed in version 0.47.2

## References

- [https://github.com/kovidgoyal/kitty/security/advisories/GHSA-q446-x7q6-vcxh](https://github.com/kovidgoyal/kitty/security/advisories/GHSA-q446-x7q6-vcxh)
