CVE-2026-134823 in Kitty
Summary
by MITRE • 11/23/2026
Kitty 0.43.0 before 0.51.0 contains a terminal escape sequence injection vulnerability that allows attackers to emit escape sequences by crafting malicious file or archive member names. When a victim highlights such an entry in the choose-files kitten preview panel, unsanitized names are written raw, enabling OSC 52 clipboard overwrites, OSC 8 links, window title changes, or screen spoofing.
If you want to get best quality of vulnerability data, you may have to visit VulDB.
Analysis
by VulDB Data Team • 11/23/2026
The vulnerability identified in Kitty terminal emulator versions prior to 0.51.0 represents a critical security flaw rooted in the improper handling of user-supplied input within its graphical interface components. Specifically, this issue affects the choose-files kitten preview panel, which is designed to display file or archive member names for selection purposes. The core technical deficiency lies in the failure to sanitize these filenames before rendering them on the screen. Because terminal emulators interpret certain byte sequences as control codes rather than literal text, an attacker can exploit this lack of validation by embedding malicious escape sequences directly into file or archive member names. When a victim interacts with such a crafted entry, specifically by highlighting it within the preview panel, the application writes these unsanitized strings raw to the terminal output stream without performing any necessary escaping or filtering operations.
This architectural oversight allows for several distinct categories of exploitation that compromise both confidentiality and integrity. The most immediate risk involves OSC 52 escape sequences, which are used to manipulate the system clipboard. By injecting a malicious filename containing an OSC 52 sequence, an attacker can overwrite the user's clipboard with arbitrary content without explicit permission or awareness. This capability facilitates data exfiltration, as sensitive information copied by the victim could be replaced or intercepted, or it enables phishing attacks where fake URLs are placed on the clipboard for subsequent pasting into browsers or other applications. Furthermore, the vulnerability permits the injection of OSC 8 escape sequences, which define hyperlinks within terminal text. An attacker can create a file name that renders as a clickable link pointing to a malicious external domain, thereby tricking users into visiting phishing sites or downloading malware when they interact with what appears to be a benign filename entry in the preview panel.
Beyond clipboard manipulation and hyperlink injection, this flaw also enables window title spoofing through specific escape sequences that modify the terminal window's header text. This technique is commonly employed in social engineering attacks to make malicious terminals appear as legitimate system processes or trusted applications, thereby increasing user trust and reducing suspicion during subsequent interactions. Additionally, the ability to emit arbitrary escape sequences opens the door for screen spoofing, where an attacker can manipulate the visual output of the terminal to hide their actual activities while displaying a decoy interface. This deception allows malicious commands to be executed in the background without alerting the user or system administrators monitoring the session visually.
From a classification perspective, this vulnerability aligns with CWE-79, which describes Cross-site Scripting involving improper neutralization of input during web page generation, adapted here for terminal environments as an injection flaw due to unsanitized output rendering. It also maps closely to CWE-116, Improper Encoding or Escaping of Output, indicating that the application failed to properly encode special characters before displaying them in a context where they would be interpreted as commands rather than data. In terms of offensive security frameworks, this behavior corresponds to MITRE ATT&CK technique T1059, Command and Scripting Interpreter, specifically through terminal emulation abuse, allowing attackers to execute arbitrary instructions via the display layer. It also relates to T1608, Install Rootkit, in scenarios where persistent access is established through clipboard or link manipulation that leads to further system compromise.
To mitigate this risk, users must upgrade Kitty to version 0.51.0 or later, as these versions implement proper sanitization of file names before they are rendered in the preview panel. Developers should ensure that all user-supplied strings intended for display are strictly validated against a whitelist of allowed characters and that any potential control codes are escaped or stripped entirely. Security best practices dictate that terminal applications must treat all external input, including filenames from archives or network sources, as untrusted data until it has been rigorously sanitized. Organizations should also enforce policies regarding the execution of scripts within terminals and monitor for unusual clipboard activity or unexpected window title changes as indicators of potential exploitation attempts involving this class of vulnerabilities.