CVE-2026-42851: @kitty-edit DCS + --color=geninclude vulnerable to Unauthenticated in-process RCE
Kitty is a cross-platform GPU based terminal. In versions prior to 0.47.0, a program able to write bytes to a kitty terminal — a remote SSH peer, a downloaded file viewed with `cat`, a log line, an email body rendered in `less`, an issue body in a TUI, etc. — can cause kitty to execute attacker-supplied Python inside the running kitty process, with the user's full privileges. There is no approval prompt, no remote-control permission requirement, no shell-integration interaction, no clipboard touch, and no editor interaction. Version 0.47.0 fixes the issue.
Metrics
- CVSS v3.1
- 7.8
- Severity
- HIGH
- Fixed in
- —
- Affected Products
- 1
HarborGuard Analysis
Synopsis
An unauthenticated in-process remote code execution vulnerability exists in the kitty GPU-based terminal emulator (kovidgoyal/kitty) prior to version 0.47.0. Any program capable of writing bytes to a kitty terminal session, including SSH peers, files viewed with cat, log output, or email bodies rendered in a pager, can inject attacker-supplied Python that kitty executes inside its own process with the user's full OS privileges. No prompt, permission check, or user approval is involved. HarborGuard is tracking the upstream advisory for patch availability and will make a patched-image rebuild available the moment a fix version is published.
HarborGuard Coverage
Detection of CVE-2026-42851 is available across every HarborGuard environment: the CVE is ingested from upstream advisory feeds within minutes of publication and matched against customer images, including custom-built images that bundle kitty or include it as a dependency, across all connected registries and CI pipelines.
AvailableTriage is available through HarborGuard's scoring pipeline, which surfaces this CVE at its CVSS v3.1 score of 7.8 (HIGH) and weights it against each customer environment's compliance policy to determine breach-of-threshold status and route the finding to the appropriate team inbox within the customer org.
AvailableBecause no fix version has been published upstream, HarborGuard re-checks the advisory on every ingest cycle and will make a patched-image rebuild available automatically the moment kovidgoyal/kitty 0.47.0 or a later fix release appears in the upstream feed. For customers with auto-remediation enabled, the rebuild, regression run, and PR against affected workloads will be triggered without requiring manual action.
Pending upstreamExploit Conditions
- Network reachabilityNot required
The attacker does not need direct network access to the host; they only need to control bytes that reach the terminal session, for example via an SSH session the victim initiates, a file the victim views, or a log stream rendered in the terminal.
- AuthenticationNot required
No account credentials or login to the kitty process are required; any source of terminal output the attacker can influence is sufficient.
- Victim interactionRequired
The victim must perform an action that causes attacker-controlled bytes to be rendered in the kitty terminal, such as opening a file, viewing a log, or connecting to a remote host.
- Attack complexityDetail
Attack complexity is low; the exploit does not depend on race conditions, memory layout randomization, or any other environmental precondition beyond controlling terminal output.
Blast Radius
- The attacker executes arbitrary Python code inside the running kitty process with the same OS user privileges as the terminal owner, giving full read access to files, environment variables, and secrets visible to that user.
- The attacker can write or modify files on the local filesystem accessible to the user, including shell configuration files, SSH keys, and application credentials.
- The attacker can terminate or corrupt the kitty process, ending the user's terminal session and any foreground workloads attached to it.
How HarborGuard Handles This
Available on HarborGuard: because no upstream fix has been published for CVE-2026-42851 at this time, HarborGuard monitors the kovidgoyal/kitty advisory on every ingest cycle and will trigger a patched-image rebuild automatically when version 0.47.0 or a later fix release is confirmed upstream. For customers with auto-remediation enabled, that rebuild will be followed immediately by a regression run and a PR opened against affected workloads, with no manual steps required. While the upstream fix is pending, recommended compensating controls include restricting which network peers can initiate sessions that write to kitty terminals (for example via SSH authorized-key constraints or network policy limiting egress to known hosts), avoiding rendering untrusted content such as downloaded files or remote log streams directly in an affected kitty session, and where possible running sensitive terminal sessions inside a reduced-privilege container or user account to limit what attacker-supplied code can reach if the terminal is compromised.
- kovidgoyal / kitty< 0.47.0
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H