7.6high
Kitty has an arbitrary file overwrite via symlink following in `kitten dnd` remote drop staging
- Severity
- 7.6high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.38% (higher than 24% of CVEs)
- Published
- Last changed
- Assigned by
- GitHub_M
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| kovidgoyal kitty | >= 0.47.0, < 0.47.2, from 0.47.0 before 0.47.2 | CVE List, NVD |
All scores
| GitHub_M | 7.6high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:N/I:H/A:L |
| NVD | 7.1high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.
What each source says
CVE List
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.
NVD (es)
Kitty es una terminal multiplataforma basada en GPU. En las versiones 0.47.0 y 0.47.1, “kitten dnd” puede permitir que un origen malicioso remoto de arrastrar y soltar sobrescriba o trunque archivos arbitrarios escribibles por el usuario local de kitty. Los elementos remotos soltados de “text/uri-list” se almacenan provisionalmente en un directorio temporal, pero en sistemas de archivos que distinguen entre mayúsculas y minúsculas, los nombres base remotos duplicados no se desduplican. Un atacante puede primero crear un enlace simbólico provisional y luego enviar una entrada de archivo regular con el mismo nombre. La escritura del archivo regular utiliza “utils.CreateAt()” / “openat(O_RDWR|O_CREAT|O_TRUNC)” sin “O_NOFOLLOW”, por lo que sigue el enlace simbólico creado por el atacante y escribe fuera del directorio provisional antes de que se ejecute la confirmación final de sobrescritura. Esto parece relacionado en su tipo con el aviso de enlace simbólico de transferencia de archivos, pero es un error diferente: afecta a la preparación remota de arrastrar y soltar de “kitten dnd”, utiliza código vulnerable diferente (“kittens/dnd/drop.go” y “tools/utils/file_at_fd.go”), y se reproduce en el commit “4aa4a5c0567a92553a8c20a88a4352da637fca5d”, después de la corrección de “O_NOFOLLOW” para la transferencia de archivos. La versión 0.47.2 soluciona el problema.
References
| https://github.com/kovidgoyal/kitty/security/advisories/GHSA-r892-cv7q-fw8x | exploit, mitigation, vendor-advisory | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-54056 changed 2026-06-15 | CVE Terms of Use |
| NVD | CVE-2026-54056 changed 2026-10-25 | Public domain |