Description
Improper Neutralization of Special Elements in Output Used by a Downstream Component in the colour control escape code handler in kitty from 0.47.3 before 0.49.0 allows a program writing to the terminal to execute an arbitrary command in the user's shell, because color_control() in kitty/window.py answers a query for an unrecognised field name by placing that field name into the reply, and write_escape_code_to_child() in kitty/screen.c then writes the reply to the pseudoterminal master, where it is not distinguishable from input typed by the user, without neutralising it for the shell that reads it. The payload is reduced to printable ASCII before the field name is echoed, which is the restriction introduced in 0.47.3 as the fix for CVE-2026-54057, and the record and field separators ; and = are consumed as delimiters, but every other printable character survives, which is sufficient to compose a shell command. A newline is available from handle_remote_ssh() in kitty/window.py, which writes the bytes yielded by get_ssh_data() in kittens/ssh/utils.py, the first of which begin with a newline, to the pseudoterminal master before any credential carried in the request is checked. The reply is framed as an OSC sequence carrying the escape code number, the field name, and the literal value ?. This results in execution of an attacker-chosen command with the privileges of the user running the terminal.
Published: 2026-09-25
Score: 9.3 Critical
EPSS: < 1% Very Low
KEV: No
Impact: Command execution in the user's shell via terminal escape codes
Action: Apply Patch
AI Analysis

Impact

The vulnerability resides in the colour control escape code parser in the kitty terminal emulator. When an unknown field name is requested, kitty reflects that field name into its reply without proper sanitisation. The reply is then written to the pseudoterminal master, appearing as user input. Because the shell reads this input, an attacker can craft a field name that contains shell syntax, resulting in the execution of an arbitrary command with the privileges of the terminal user. The weakness is an instance of Improper Neutralisation of Special Elements in Output, a variant of injection, which is identified as CWE‑74 and CWE‑78.

Affected Systems

The affected product is kitty by Kovid Goyal, versions from 0.47.3 up to but not including 0.49.0. This includes all builds of kitty released in that range that ship the colour control escape code logic in window.py and screen.c.

Risk and Exploitability

With a CVSS score of 9.3, the vulnerability is considered critical. The EPSS score is less than 1%, indicating a very low exploitation probability, and the issue has not been listed in the CISA KEV catalog, suggesting limited known exploitation. However, the attack vector requires a program with write access to the terminal’s pseudoterminal master – a condition that can be satisfied by local applications, potentially including malicious or compromised software. Once triggered, it leads to full command execution in the context of the terminal user, granting the attacker complete control over that user’s session.

Generated by OpenCVE AI on September 30, 2026 at 05:19 UTC.

Remediation

Vendor Solution

Upgrade to kitty 0.49.0 or later.


OpenCVE Recommended Actions

  • Upgrade kitty to version 0.49.0 or later
  • Verify that no legacy or custom scripts or applications write arbitrary colour control escape codes to the terminal
  • Restrict write access to the terminal’s pseudoterminal master to trusted processes only

Generated by OpenCVE AI on September 30, 2026 at 05:19 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Tue, 29 Sep 2026 13:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-78
References
Metrics threat_severity

None

cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'}

threat_severity

Important


Sat, 26 Sep 2026 18:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Fri, 25 Sep 2026 13:00:00 +0000

Type Values Removed Values Added
Description Improper Neutralization of Special Elements in Output Used by a Downstream Component in the colour control escape code handler in kitty from 0.47.3 before 0.49.0 allows a program writing to the terminal to execute an arbitrary command in the user's shell, because color_control() in kitty/window.py answers a query for an unrecognised field name by placing that field name into the reply, and write_escape_code_to_child() in kitty/screen.c then writes the reply to the pseudoterminal master, where it is not distinguishable from input typed by the user, without neutralising it for the shell that reads it. The payload is reduced to printable ASCII before the field name is echoed, which is the restriction introduced in 0.47.3 as the fix for CVE-2026-54057, and the record and field separators ; and = are consumed as delimiters, but every other printable character survives, which is sufficient to compose a shell command. A newline is available from handle_remote_ssh() in kitty/window.py, which writes the bytes yielded by get_ssh_data() in kittens/ssh/utils.py, the first of which begin with a newline, to the pseudoterminal master before any credential carried in the request is checked. The reply is framed as an OSC sequence carrying the escape code number, the field name, and the literal value ?. This results in execution of an attacker-chosen command with the privileges of the user running the terminal.
Title Reflected unknown field names in the kitty colour control escape code allow command execution in the user's shell
First Time appeared Kovidgoyal
Kovidgoyal kitty
Weaknesses CWE-74
CPEs cpe:2.3:a:kovidgoyal:kitty:*:*:*:*:*:*:*:*
Vendors & Products Kovidgoyal
Kovidgoyal kitty
References
Metrics cvssV4_0

{'score': 9.3, 'vector': 'CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H'}


Subscriptions

Kovidgoyal Kitty
cve-icon MITRE

Status: PUBLISHED

Assigner: Secur0

Published:

Updated: 2026-09-25T15:30:58.146Z

Reserved: 2026-09-22T16:30:06.022Z

Link: CVE-2026-95832

cve-icon Vulnrichment

Updated: 2026-09-25T15:30:39.404Z

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-09-25T13:17:24.063

Modified: 2026-09-29T21:32:59.833

Link: CVE-2026-95832

cve-icon Redhat

Severity : Important

Publid Date: 2026-09-25T12:54:25Z

Links: CVE-2026-95832 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-09-30T05:30:18Z

Weaknesses
  • CWE-74

    Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')

  • CWE-78

    Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')