CVE-2026-80430: Improper link resolution in the kitty drag and drop protocol allows a client to create files outside the staging directory

Published Sep 25, 2026
·
Updated

Improper Link Resolution Before File Access in the drag source staging 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 create files and directories at paths outside the staging directory, because subdirdatafordrag() in kitty/dnd.c resolves a descendant of the staged item tree by constructing a path string and opening it with safeopen(path, ODIRECTORY | ORDONLY, 0) rather than by walking the tree one component at a time, so a client that declares two entries with the same name, the first a symlink whose target is an arbitrary absolute path and the second a directory, causes mkdirat() to fail with EEXIST, which the code ignores, and causes the subsequent path resolution to follow the symlink and return a directory descriptor outside the staging directory, which is then passed as the dirfd argument to addpayload() and used for every further create operation on that item and its descendants. Entry names are sanitised against path separators and dot components, but symlink targets are not validated. Files are created with OCREAT | OWRONLY | OEXCL at mode 0644, so existing files cannot be overwritten, and directories are created with mkdirat() at mode 0755, so the attacker can create intermediate directories that did not previously exist. This results in the creation of files and directories at any path writable by the user running kitty, provided the symlink target is an existing directory.

Affected Software

1 affected component
Kitty Kitty>=0.47.0<0.49.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade kitty to a version that resolves this vulnerability.

    Fixed in 0.49.0

Event History

Sep 25, 2026
CVE Published
via MITRE·01:08 PM
Data Sourced
via MITRE·01:08 PM
RemedyDescriptionWeakness

Frequently Asked Questions

1

Which kitty versions are affected?

kitty versions from 0.47.0 up to, but not including, 0.49.0 are affected. Version 0.49.0 is the referenced fixed release.

2

What does an attacker need to exploit this?

An attacker needs to run or control a program that can write the crafted drag-and-drop protocol data to the terminal. The payload declares duplicate entry names: first a symlink to an arbitrary absolute path, then a directory with the same name.

3

What is the practical impact of a successful exploit?

The attacker can cause files and directories for the dragged item and its descendants to be created outside kitty's staging directory, under the directory targeted by the symlink. Existing files cannot be overwritten because file creation uses O_EXCL, and created files use mode 0644.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203