Description
Kitty is a cross-platform GPU based terminal. In versions 0.47.0 and 0.47.1, `kitten dnd` can allow a malicious remote drag-and-drop source to overwrite or truncate arbitrary files writable by the local kitty user. Remote `text/uri-list` drops are staged in a temporary directory, but on case-sensitive filesystems duplicate remote basenames are not de-duplicated. An attacker can first create a staged symlink and then send a same-name regular-file entry. The regular-file write uses `utils.CreateAt()` / `openat(O_RDWR|O_CREAT|O_TRUNC)` without `O_NOFOLLOW`, so it follows the attacker-created symlink and writes outside the staging directory before final overwrite confirmation runs. This appears related in class to the file-transfer symlink advisory, but it is a different bug: it affects `kitten dnd` remote drag-and-drop staging, uses different vulnerable code (`kittens/dnd/drop.go` and `tools/utils/file_at_fd.go`), and reproduces on commit `4aa4a5c0567a92553a8c20a88a4352da637fca5d`, after the file-transfer `O_NOFOLLOW` fix. Version 0.47.2 patches the issue.
Published: 2026-06-12
Score: 7.6 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Kitty, a GPU‑based terminal, contains a file‑overwrite flaw in the kitten dnd drag‑and‑drop staging mechanism. When a remote source delivers a text/uri‑list drop, Kitty stages the transfer in a temporary directory, but on case‑sensitive filesystems duplicate basenames are not merged. An attacker can first create a symlink inside the staging area and then submit a regular file with the same name. Because the write operation uses openat with O_RDWR|O_CREAT|O_TRUNC without the O_NOFOLLOW flag, the subsequent write follows the attacker‑created symlink and overwrites or truncates an arbitrary file that the local kitty user can write to. The vulnerability allows an attacker to modify any such file, potentially affecting configuration, source code, or other data, thereby imposing a serious integrity compromise. It is classified as CWE‑59 (Path Traversal).

Affected Systems

The affected vendor is KovidGoyal, the product is Kitty. Versions 0.47.0 and 0.47.1 are vulnerable. The issue is resolved in 0.47.2 and later releases.

Risk and Exploitability

The CVSS score of 7.6 indicates a high impact vulnerability. The EPSS score is less than 1%, suggesting that exploitation is currently unlikely but not impossible. The flaw is not listed in CISA’s KEV catalog. Exploitation requires a malicious drag‑and‑drop source to supply a text/uri‑list that targets the local Kitty session; therefore the attack vector is an indirect ability for a remote attacker to induce local file manipulation by a trusted user’s terminal.

Generated by OpenCVE AI on June 12, 2026 at 22:39 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Kitty to version 0.47.2 or later, which removes the vulnerable openat usage and prevents symlink following during file staging
  • If upgrading is not immediately possible, disable the kitten dnd drag‑and‑drop feature or configure Kitty to reject drops from untrusted sources
  • Ensure that local users limit write permissions on critical files and that any accidental file overwrites can be detected or prevented through file integrity monitoring

Generated by OpenCVE AI on June 12, 2026 at 22:39 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 12 Jun 2026 23:30:00 +0000

Type Values Removed Values Added
First Time appeared Kovidgoyal
Kovidgoyal kitty
Vendors & Products Kovidgoyal
Kovidgoyal kitty

Fri, 12 Jun 2026 21:00:00 +0000

Type Values Removed Values Added
Description Kitty is a cross-platform GPU based terminal. In versions 0.47.0 and 0.47.1, `kitten dnd` can allow a malicious remote drag-and-drop source to overwrite or truncate arbitrary files writable by the local kitty user. Remote `text/uri-list` drops are staged in a temporary directory, but on case-sensitive filesystems duplicate remote basenames are not de-duplicated. An attacker can first create a staged symlink and then send a same-name regular-file entry. The regular-file write uses `utils.CreateAt()` / `openat(O_RDWR|O_CREAT|O_TRUNC)` without `O_NOFOLLOW`, so it follows the attacker-created symlink and writes outside the staging directory before final overwrite confirmation runs. This appears related in class to the file-transfer symlink advisory, but it is a different bug: it affects `kitten dnd` remote drag-and-drop staging, uses different vulnerable code (`kittens/dnd/drop.go` and `tools/utils/file_at_fd.go`), and reproduces on commit `4aa4a5c0567a92553a8c20a88a4352da637fca5d`, after the file-transfer `O_NOFOLLOW` fix. Version 0.47.2 patches the issue.
Title Kitty has an arbitrary file overwrite via symlink following in `kitten dnd` remote drop staging
Weaknesses CWE-59
References
Metrics cvssV3_1

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


Subscriptions

Kovidgoyal Kitty
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-06-12T20:06:06.437Z

Reserved: 2026-06-11T18:24:35.096Z

Link: CVE-2026-54056

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-06-12T21:16:24.463

Modified: 2026-06-12T21:16:24.463

Link: CVE-2026-54056

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-06-12T23:15:10Z

Weaknesses
  • CWE-59

    Improper Link Resolution Before File Access ('Link Following')