CVE catalog

CVE-2026-95834

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 h

[CVE catalog]

Severity
High · CVSS 7.8CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Published
Updated
Source
[NVD] · [CVE record]
EPSS
0.13% · Oct 25, 2026

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.

Vulnerable and fixed packages

Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.

DistributionPackageReleaseVersionStatus
Debiankittysid0.48.2-1.1vulnerable
Debiankittyforky0.48.2-1.1vulnerable
Debiankittytrixie0.41.1-2+deb13u2vulnerable
Debiankittytrixie-security0.41.1-2+deb13u2vulnerable
Debiankittybookworm0.26.5-5vulnerable

Fixed-version evidence

DistributionPackageTypeReleaseFixed versionUrgencyOriginBugs
Debiankittysourcesid(unfixed)not yet assignedNot reported[1149729]
Debiankittysourceforky(unfixed)not yet assignedNot reported[1149729]
Debiankittysourcetrixie(unfixed)not yet assignedNot reported[1149729]
Debiankittysourcebookworm(unfixed)not yet assignedNot reported[1149729]

[Debian bug #1149729]

OpenFactory catalog packages

[Debian 12 (Bookworm)]

  • [kitty]Affected
    Details (2)
    • 0.26.5-5 · amd64 · bookworm

      Affected

      nvd · kitty · debian · bookworm; nvd · kitty · debian · 12

    • 0.26.5-5 · arm64 · bookworm

      Affected

      nvd · kitty · debian · bookworm; nvd · kitty · debian · 12

  • [kitty-doc]Affected

    Source package: [kitty]

    Details (2)
    • 0.26.5-5 · all · bookworm

      Affected

      nvd · kitty · debian · bookworm; nvd · kitty · debian · 12

    • 0.26.5-5 · all · bookworm

      Affected

      nvd · kitty · debian · bookworm; nvd · kitty · debian · 12

  • Source package: [kitty]

    Details (2)
    • 0.26.5-5 · all · bookworm

      Affected

      nvd · kitty · debian · bookworm; nvd · kitty · debian · 12

    • 0.26.5-5 · all · bookworm

      Affected

      nvd · kitty · debian · bookworm; nvd · kitty · debian · 12

  • [kitty-terminfo]Affected

    Source package: [kitty]

    Details (2)
    • 0.26.5-5 · all · bookworm

      Affected

      nvd · kitty · debian · bookworm; nvd · kitty · debian · 12

    • 0.26.5-5 · all · bookworm

      Affected

      nvd · kitty · debian · bookworm; nvd · kitty · debian · 12

[Debian 13 (Trixie)]

  • [kitty]Affected
    Details (4)
    • 0.41.1-2+deb13u1 · amd64 · trixie

      Affected

      nvd · kitty · debian · 13

    • 0.41.1-2+deb13u1 · arm64 · trixie

      Affected

      nvd · kitty · debian · 13

    • 0.41.1-2+deb13u2 · amd64 · trixie-security

      Affected

      nvd · kitty · debian · 13

    • 0.41.1-2+deb13u2 · arm64 · trixie-security

      Affected

      nvd · kitty · debian · 13

  • [kitty-doc]Affected

    Source package: [kitty]

    Details (4)
    • 0.41.1-2+deb13u1 · all · trixie

      Affected

      nvd · kitty · debian · 13

    • 0.41.1-2+deb13u1 · all · trixie

      Affected

      nvd · kitty · debian · 13

    • 0.41.1-2+deb13u2 · all · trixie-security

      Affected

      nvd · kitty · debian · 13

    • 0.41.1-2+deb13u2 · all · trixie-security

      Affected

      nvd · kitty · debian · 13

  • Source package: [kitty]

    Details (4)
    • 0.41.1-2+deb13u1 · all · trixie

      Affected

      nvd · kitty · debian · 13

    • 0.41.1-2+deb13u1 · all · trixie

      Affected

      nvd · kitty · debian · 13

    • 0.41.1-2+deb13u2 · all · trixie-security

      Affected

      nvd · kitty · debian · 13

    • 0.41.1-2+deb13u2 · all · trixie-security

      Affected

      nvd · kitty · debian · 13

  • [kitty-terminfo]Affected

    Source package: [kitty]

    Details (4)
    • 0.41.1-2+deb13u1 · all · trixie

      Affected

      nvd · kitty · debian · 13

    • 0.41.1-2+deb13u1 · all · trixie

      Affected

      nvd · kitty · debian · 13

    • 0.41.1-2+deb13u2 · all · trixie-security

      Affected

      nvd · kitty · debian · 13

    • 0.41.1-2+deb13u2 · all · trixie-security

      Affected

      nvd · kitty · debian · 13

Observed:

References