# CVE-2026-42850: kovidgoyal kitty command injection via unescaped error sequences

Source: https://junglewise.ai/threats/cve-2026-42850-kovidgoyal-kitty-command-injection-via-unescaped-error-sequences  
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-42850 · Severity: info · CVSS 7.4 · Published 2026-06-12

Kitty is a high-performance, GPU-based terminal emulator. A vulnerability in how the terminal handles specific error messages allows an attacker to remotely execute commands on a user's computer if the user connects to a malicious server or service (such as via netcat). This could lead to a full system compromise, allowing the attacker to view files or modify data on the victim's machine.

## Quick answers

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

**How severe is CVE-2026-42850?** Informational severity, with a CVSS score of 7.4, published 12 June 2026.

**Which products and versions are affected?** kovidgoyal kitty < 0.47.0.

**Is there a fix for CVE-2026-42850?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

**How is CVE-2026-42850 attacked?** It is attacked over the network, in a network appliance.

**Am I affected by CVE-2026-42850?** 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 command injection vulnerability exists in Kitty versions prior to 0.47.0 due to improper neutralization of special elements in terminal escape codes. Specifically, using the '\x1bP@kitty-ssh|...' escape sequence can trigger a 'kitty-ssh' function that attempts to open a file via shm_open. When the operation fails, the resulting error message is returned to the terminal without proper escaping and includes CRLF characters. This causes the terminal to echo the error string back into the active shell buffer, where it is executed as a command. Exploitation requires the victim to connect to an attacker-controlled network service (e.g., via netcat) that sends the malicious escape sequence. The issue is resolved in version 0.47.0.

## Affected products

- kovidgoyal kitty < 0.47.0

## Timeline

- 2026-05-19: advisory: GitHub Security Advisory published
- 2026-06-12: disclosed: CVE published to NVD

## References

- [https://github.com/kovidgoyal/kitty/security/advisories/GHSA-p64q-59hq-5q65](https://github.com/kovidgoyal/kitty/security/advisories/GHSA-p64q-59hq-5q65)
