Impact
The flaw is a CWE-416 Use‑after‑free vulnerability that arises when a drag source item in Kitty’s drag‑and‑drop protocol is aborted mid‑transfer. A pointer to an array that kitty does not own is retained and later used after that array has been freed. This use‑after‑free allows a program that writes to the terminal to cause Kitty to read from and write to freed heap memory, producing undefined behaviour that could manifest as a crash or, in the worst case, arbitrary code execution inside the terminal process.
Affected Systems
The vulnerability affects the Kitty terminal emulator from version 0.47.0 up to, but not including, 0.49.0. The affected vendor is Kovid Goyal; the product is kitty. Users running any of these versions are susceptible.
Risk and Exploitability
With a CVSS score of 4.6 the flaw is considered moderate severity. The EPSS score is currently unavailable, and it is not listed in the CISA KEV catalogue. Attackers can exploit the weakness by sending malformed drag‑and‑drop data from any program that writes to the terminal, a scenario that is local to the user and therefore easily achievable inside a user session. Because the flaw subsists in the byte stream received by Kitty, a malicious application can trigger it without additional privileges. The resulting undefined behavior can lead to denial of service or potential privilege escalation if the attacker gains control of the terminal process.
OpenCVE Enrichment