CVE-2026-42851: CWE-94: Improper Control of Generation of Code ('Code Injection') in kovidgoyal kitty
Kitty terminal versions prior to 0.47.0 contain a code injection vulnerability that allows an attacker to execute arbitrary Python code within the running kitty process. This can occur when a program writes bytes to the terminal, such as through a remote SSH session, viewing files, or rendering text in various interfaces. The vulnerability does not require user approval or interaction beyond displaying the malicious input. Version 0.47.0 addresses this issue.
AI Analysis
Technical Summary
CVE-2026-42851 is a code injection vulnerability (CWE-94) in the kitty terminal emulator before version 0.47.0. An attacker able to write bytes to the terminal can cause kitty to execute attacker-supplied Python code with the user's privileges without any user interaction or approval prompts. This includes input from remote SSH peers, file contents viewed with commands like `cat`, or text rendered in terminal user interfaces. The vulnerability allows full code execution within the kitty process, posing a high risk to confidentiality, integrity, and availability. The issue is fixed in kitty version 0.47.0.
Potential Impact
Successful exploitation results in arbitrary Python code execution within the kitty process under the user's privileges. This can lead to full compromise of the user's environment, including data theft, modification, or denial of service. The vulnerability requires only that an attacker can write bytes to the terminal, which can occur through various common interactions such as SSH sessions or viewing malicious files.
Mitigation Recommendations
Upgrade kitty to version 0.47.0 or later, which fixes this vulnerability. There is no indication of any temporary or alternative mitigations. Users should apply the official fix to prevent exploitation.
CVE-2026-42851: CWE-94: Improper Control of Generation of Code ('Code Injection') in kovidgoyal kitty
Description
Kitty terminal versions prior to 0.47.0 contain a code injection vulnerability that allows an attacker to execute arbitrary Python code within the running kitty process. This can occur when a program writes bytes to the terminal, such as through a remote SSH session, viewing files, or rendering text in various interfaces. The vulnerability does not require user approval or interaction beyond displaying the malicious input. Version 0.47.0 addresses this issue.
CVSS v3.1
Score 7.8high
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-42851 is a code injection vulnerability (CWE-94) in the kitty terminal emulator before version 0.47.0. An attacker able to write bytes to the terminal can cause kitty to execute attacker-supplied Python code with the user's privileges without any user interaction or approval prompts. This includes input from remote SSH peers, file contents viewed with commands like `cat`, or text rendered in terminal user interfaces. The vulnerability allows full code execution within the kitty process, posing a high risk to confidentiality, integrity, and availability. The issue is fixed in kitty version 0.47.0.
Potential Impact
Successful exploitation results in arbitrary Python code execution within the kitty process under the user's privileges. This can lead to full compromise of the user's environment, including data theft, modification, or denial of service. The vulnerability requires only that an attacker can write bytes to the terminal, which can occur through various common interactions such as SSH sessions or viewing malicious files.
Mitigation Recommendations
Upgrade kitty to version 0.47.0 or later, which fixes this vulnerability. There is no indication of any temporary or alternative mitigations. Users should apply the official fix to prevent exploitation.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-04-30T16:44:48.378Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a2c6778e617e2d834bac51e
Added to database: 6/12/2026, 8:09:28 PM
Last enriched: 6/12/2026, 8:24:17 PM
Last updated: 6/12/2026, 9:21:03 PM
Views: 5
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.