CVE-2026-42850 Kitty has a shell command injection
Attackers can execute arbitrary shell commands on a victim's machine by sending specially crafted escape codes to a Kitty terminal session.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2026-42850?
CVE-2026-42850 is a high-severity command injection vulnerability in kovidgoyal kitty, published on 12 Jun 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
Kitty is a cross-platform GPU based terminal. In versions prior to 0.47.0, it is possible to inject commands within the subshell through kitty error. A special escape code will make kitty return an error, this error is not escaped and will be correctly echoed back to the terminal with CRLF, as such it will be run by the shell in use. To exploit this bug, the victim must use a netcat or a similar program to connect to the attacker, or else listening for someone to connect. Once this condition is set, an attacker could pwn the computer of the victim using a special kitty's escape code that will run a command in the shell in use. Version 04.7.0 fixes the issue.
Weakness: CWE-77
Which versions are affected by CVE-2026-42850?
It affects 1 product.
Products include Kovidgoyal Kitty.
How do I fix CVE-2026-42850?
Upgrade to a fixed version.
Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.
Is CVE-2026-42850 being exploited?
There is no known exploitation of CVE-2026-42850 in the wild and no public exploit code.
Other vulnerabilities in kovidgoyal kitty
- CVE-2026-33642 Kitty has a Heap Buffer Over-Read/Write via Integer Overflow in compose_rectangles Bounds Check
- CVE-2026-42851 @kitty-edit DCS + --color=geninclude vulnerable to Unauthenticated in-process RCE
- CVE-2026-54056 Kitty has an arbitrary file overwrite via symlink following in `kitten dnd` remote drop staging
- CVE-2026-33633 Kitty has a Heap Buffer Overflow in its Graphics Protocol Handler
- CVE-2026-54057 Kitty vulnerable to command injection via unsanitized OSC 21 query reply
Sources
Also known as DEBIAN-CVE-2026-42850, GHSA-p64q-59hq-5q65, UBUNTU-CVE-2026-42850.