Skip to main content

CVE-2026-80430: CWE-59 Improper Link Resolution Before File Access ('Link Following') in Kovid Goyal kitty

0
Medium
VulnerabilityCVE-2026-80430cvecve-2026-80430cwe-59
Published: 09/25/2026 (09/25/2026, 13:08:13 UTC)
Source: CVE Database V5
Vendor/Project: Kovid Goyal
Product: kitty

Description

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 subdir_data_for_drag() in kitty/dnd.c resolves a descendant of the staged item tree by constructing a path string and opening it with safe_open(path, O_DIRECTORY | O_RDONLY, 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 add_payload() 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 O_CREAT | O_WRONLY | O_EXCL 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.

CVSS v4.0

Score 4.6medium

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Active
Vuln. Confidentiality
None
Vuln. Integrity
None
Vuln. Availability
None
Subsq. Confidentiality
None
Subsq. Integrity
Low
Subsq. Availability
None
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:N/SI:L/SA:N

Affected software

Kovid Goyal

kitty

Affected versions
>=0.47.0 <0.49.0
GitHub Actionsmore threats →cve
kitty
pkg:github/kitty
Affected versions
>=0.47.0 <0.49.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 09/25/2026, 13:47:47 UTC

Technical Analysis

This vulnerability arises from improper link resolution before file access in kitty's drag source staging path. Specifically, the function subdir_data_for_drag() in kitty/dnd.c constructs a path string and opens it with safe_open() instead of walking the directory tree component by component. An attacker can declare two entries with the same name: the first a symlink pointing to an arbitrary absolute path and the second a directory. The code ignores mkdirat() failure with EEXIST, causing subsequent path resolution to follow the symlink outside the staging directory. This directory descriptor is then used for creating files and directories, allowing creation at any path writable by the user running kitty. Entry names are sanitized, but symlink targets are not validated. Files are created with O_CREAT | O_WRONLY | O_EXCL and mode 0644, preventing overwriting existing files, and directories with mode 0755, allowing creation of intermediate directories.

Potential Impact

An attacker with the ability to write to the terminal can create files and directories at arbitrary paths writable by the user running kitty, outside the intended staging directory. This could lead to unauthorized file creation, potentially impacting user data or environment. However, existing files cannot be overwritten, and no privilege escalation or remote exploitation is indicated. The attack requires local access and user interaction.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, users should avoid running vulnerable versions (>=0.47.0 <0.49.0) or restrict access to trusted users only. Monitoring for updates from the vendor is recommended.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
Secur0
Date Reserved
2026-08-26T10:49:00.437Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 6ab67829f7a7c54106d2774c

Added to database: 09/25/2026, 13:33:29 UTC

Last enriched: 09/25/2026, 13:47:47 UTC

Last updated: 09/25/2026, 16:41:57 UTC

Views: 8

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses