Code Injection in kitty - CVE-2026-42851

 

Code Injection in kitty - CVE-2026-42851

Published: September 22, 2026


Vulnerability identifier: #VU151620
CSH Severity: High
CVSS v4: 8.4 [CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2026-42851
CWE-ID: CWE-94
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to execute arbitrary code.

The vulnerability exists due to improper control of generation of code in the @kitty-edit DCS handler and color configuration parser when processing attacker-controlled terminal output. A remote attacker can send terminal control sequences containing a --color=geninclude directive to execute arbitrary code.

User interaction is required to view attacker-controlled bytes through a kitty terminal; no further approval, editor interaction, or remote-control permission is required.


Affected software

kitty
Debian Linux
kitty (Debian package)

How to mitigate CVE-2026-42851

Install security update from vendor's website.

kitty - update to 0.47.0
kitty (Debian package) - update to 0.41.1-2+deb13u2

External References

Related Security Bulletins