Severity by source
CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Local delivery of bytes to the terminal (AV:L), low complexity, no privileges on Kitty, requires user to view content and be at shell prompt (UI:R), full shell command execution yields C/I/A:H.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Lifecycle Timeline
2DescriptionCVE.org
Kitty is a cross-platform GPU based terminal. In versions prior to 0.47.3, kitty's OSC 21 (color-control) query reply reflects attacker-controlled bytes, including newlines, into the shell's input without sanitization. Version 0.47.3 fixes the issue.
AnalysisAI
Code injection in Kitty terminal emulator versions prior to 0.47.3 allows attacker-controlled bytes - including newline characters - to be reflected back into the user's shell input via the OSC 21 (color-control) escape sequence query reply. An attacker who can cause arbitrary bytes to be written to the terminal (malicious file contents, SSH banner, log entry, web page) can inject and execute shell commands at the victim's privilege level. No public exploit identified at time of analysis, but the underlying class of terminal-escape-injection bugs is well documented and exploitation is straightforward once the unsanitized reply path is known.
Technical ContextAI
Kitty is a cross-platform, GPU-accelerated terminal emulator written by Kovid Goyal (CPE cpe:2.3:a:kovidgoyal:kitty). OSC (Operating System Command) sequences are part of the ANSI/ECMA-48 control protocol; OSC 21 is Kitty's color-control extension that lets applications query and set palette colors, with the terminal writing its reply back onto the pty as if the user had typed it. The flaw is a classic CWE-94 (Improper Control of Generation of Code) problem: the reply path echoes attacker-supplied bytes from the original query payload without stripping or escaping control characters such as CR/LF, so a newline injected into the query causes the shell to treat any following bytes as a fresh command line. This is the same vulnerability class as the historical iTerm2 and various xterm DCS/OSC injection bugs.
RemediationAI
Vendor-released patch: upgrade Kitty to version 0.47.3 or later, which sanitizes OSC 21 reply bytes; the fix and details are documented in the upstream advisory at https://github.com/kovidgoyal/kitty/security/advisories/GHSA-5gmr-9gwg-hhq6. If immediate patching is not possible, compensating controls include avoiding direct output of untrusted data to the terminal - pipe suspect files through a sanitizer such as cat -v, less -R with control-character filtering, or strings before viewing (trade-off: loses legitimate color/formatting); refusing to cat arbitrary log files, downloaded artifacts, or unknown SSH MOTD/banners; and disabling shell auto-execution on Enter where supported (e.g., zsh setopt NO_FLOW_CONTROL plus bracketed-paste-mode hardening, though this does not fully mitigate newline injection into a live prompt). The cleanest mitigation remains the upgrade.
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-94 – Code Injection
View allSame technique Code Injection
View allVendor StatusVendor
SUSE
Severity: Important| Product | Status |
|---|---|
| openSUSE Tumbleweed | Fixed |
Share
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-36579