CVE-2026-95834
Awaiting Analysis Awaiting Analysis - Queue

Use After Free in Kitty Terminal Emulator

Vulnerability report for CVE-2026-95834, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-09-25

Last updated on: 2026-09-29

Assigner: Secur0

Description

Use After Free in the drag source path of the drag and drop protocol in kitty from 0.47.0 before 0.49.0 allows a program writing to the terminal to cause the terminal to read from and write to freed heap memory, because drag_remote_file_data() in kitty/dnd.c holds a DragRemoteItem pointer into an array it does not own, calls toplevel_data_for_drag() or subdir_data_for_drag(), and then continues to use that pointer. Those helpers, and add_payload() and populate_dir_entries() which they call, report errors through the abrt() macro, which expands to cancel_drag() followed by a plain return, and cancel_drag() calls drag_free_offer(), which frees the array the pointer refers to. The helpers return void, so the caller receives no indication that the teardown happened, and proceeds to call all_children_complete() on the freed pointer, which dereferences it, and then to write through it. That dereference is guarded by a local flag that is set when the request carries no payload and announces no further data, which is the same condition that selects the finalisation block of add_payload(), so the error paths in that block reach it: a create that fails because an entry of the same name already exists, because the client may declare two entries with one name and the create operations use O_CREAT with O_EXCL and symlinkat(), a mkdirat() failure other than EEXIST, and the directory entry allocation paths. Both branches reach it. In the top level branch the caller's pointer is never cleared, so clearing the owning structure's own pointers during teardown does not help. In the sub directory branch subdir_data_for_drag() sets the caller's pointer to NULL on entry and assigns it only after its own last error path, so its own aborts leave the caller with NULL and are stopped by a null check, but it then calls add_payload() with that pointer set, and an abort there leaves the caller holding a freed child node inside the item tree, which drag_free_offer() frees by recursion. This results in undefined behaviour in the terminal process, reachable from the byte stream of any program running in the window.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-09-25
Last Modified
2026-09-29
Generated
2026-10-16
AI Q&A
2026-09-25
EPSS Evaluated
2026-10-14
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
kitty kitty From 0.47.0 (inc) to 0.49.0 (exc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-416 The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory "belongs" to the code that operates on the new pointer.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability is a Use After Free issue in the kitty terminal emulator. It occurs during drag and drop operations when a program writes to the terminal. The terminal incorrectly reads from and writes to freed heap memory, leading to undefined behavior. The flaw happens because a pointer to memory is used after it has been freed, specifically in the drag source path of the drag and drop protocol.

Detection Guidance

This vulnerability is specific to the kitty terminal emulator versions 0.47.0 to 0.49.0. To detect it, check the installed version of kitty using the command: kitty --version. If the version falls within the vulnerable range, the system is potentially affected.

Impact Analysis

This vulnerability could allow an attacker to execute arbitrary code or cause a denial of service by exploiting the terminal emulator. If exploited, it may crash the terminal or allow unauthorized access to system memory, potentially compromising the user's system or data.

Compliance Impact

This vulnerability is a use-after-free issue in the kitty terminal emulator that could lead to undefined behavior in the terminal process. It does not directly relate to data protection or privacy compliance standards like GDPR or HIPAA, as it primarily affects the stability and security of the terminal application itself rather than handling or exposing sensitive data.

Mitigation Strategies

Upgrade kitty to version 0.49.0 or later immediately. This can be done using your package manager, e.g., sudo apt upgrade kitty for Debian-based systems or sudo dnf upgrade kitty for Fedora-based systems. Avoid using vulnerable versions until patched.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-95834. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart