# CVE-2026-95834: Use after free in the kitty drag and drop protocol when a drag source item is aborted mid-transfer

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 4.6
- **CVSS:** 4.6 (v4.0, CNA) `CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Attack requirements: None; Privileges required: None; User interaction: Active; Confidentiality impact: None; Integrity impact: Low; Availability impact: Low; Confidentiality impact on other systems: None; Integrity impact on other systems: None; Availability impact on other systems: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.18% (percentile 4, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2026-09-25T16:28:09.295Z
- **Modified:** 2026-09-29T21:32:59.833Z

## Who should check

- Anyone running Kovid Goyal kitty \>= 0.47.0, \< 0.49.0

## 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.

## Affected and fixed versions

- Kovid Goyal kitty: \>= 0.47.0, \< 0.49.0 (cvelist)

## Mitigation

- Upgrade kitty to 0.49.0 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-95834. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-95834.md
Affected: Kovid Goyal kitty >= 0.47.0, < 0.49.0
Fixed in: Kovid Goyal kitty 0.49.0

Steps:
1. Search this machine and project for Kovid Goyal kitty: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-95834 being exploited?

There is no confirmed exploitation: CVE-2026-95834 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.18% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-95834?

Medium: CVSS 4.6 (v4.0, scored by CNA). Not remotely exploitable (local or adjacent access needed). A user has to take an action, such as opening a link, for the attack to work.

### Which versions are affected by CVE-2026-95834?

Kovid Goyal kitty \>= 0.47.0, \< 0.49.0.

### Is there a fix for CVE-2026-95834?

Yes. Fixed in Kovid Goyal kitty 0.49.0. Upgrade kitty to 0.49.0 or later.

### How do I check if I'm affected by CVE-2026-95834?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://github.com/kovidgoyal/kitty/commit/b54bfbb4f85f992edca9b04f5c0c2612454eec23>
- article: <https://secur0.com/en/cna/cve-list/cve-2026-95834-kitty-dnd-use-after-free>
- other: <https://github.com/kovidgoyal/kitty/releases/tag/v0.49.0>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-95834>

HTML: <https://flawdb.com/CVE-2026-95834> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-95834>
