Out-of-bounds write in the kitty text sizing protocol allows termination of the terminal process

Summary

CVECVE-2026-80431
StatePUBLISHED
AssignerSecur0
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-09-25 14:17:19 UTC
Updated2026-09-25 16:17:27 UTC
DescriptionOut-of-bounds Write in the natural width branch of the text sizing protocol in kitty from 0.40.0 before 0.49.0 allows a program writing to the terminal to write past the end of a fixed-size buffer, because screen_handle_multicell_command() in kitty/screen.c appends each codepoint of a grapheme cluster with lc.chars[lc.count++] = ch without any capacity check, while lc is declared by the RAII_ListOfChars macro as a four-element char_type array in the function's stack frame, so an OSC 66 escape code whose payload carries a grapheme cluster longer than four codepoints writes beyond that buffer, one 32-bit value per additional codepoint, in the order the codepoints appear. Where the cluster is preceded in the same payload by a sequence that causes an intermediate flush, the buffer is first migrated to the heap by ensure_space_for_chars() and the write occurs past the heap allocation instead. This results in termination of the kitty process and therefore of all its windows, tabs and child processes.

Risk And Classification

Primary CVSS: v4.0 6.8 MEDIUM from 4daa8cea-433a-44bd-9456-53b127fc289a

CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

EPSS: 0.001360000 probability, percentile 0.025110000 (date 2026-09-27)

Problem Types: CWE-787 | CWE-787 CWE-787 Out-of-bounds Write


VersionSourceTypeScoreSeverityVector
4.04daa8cea-433a-44bd-9456-53b127fc289aSecondary6.8MEDIUMCVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/C...
4.0CNACVSS6.8MEDIUMCVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

CVSS v4.0 Breakdown

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Confidentiality
None
Integrity
None
Availability
High
Sub Conf.
None
Sub Integrity
None
Sub Availability
None

CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Kovid Goyal Kitty affected 0.40.0 0.49.0 semver Not specified

References

ReferenceSourceLinkTags
secur0.com/en/cna/cve-list/cve-2026-80431-kitty-text-sizing-out-of-bound... 4daa8cea-433a-44bd-9456-53b127fc289a secur0.com
github.com/kovidgoyal/kitty/commit/7d2fbaadcc2b1eeeef89bd875ec622b42362574b 4daa8cea-433a-44bd-9456-53b127fc289a github.com
github.com/kovidgoyal/kitty/releases/tag/v0.49.0 4daa8cea-433a-44bd-9456-53b127fc289a github.com
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

Vendor Comments And Credit

Discovery Credit

CNA: C4sh3R (en)

CNA: Cristian Fernández Cornejo (en)

CNA: Xoán M. Otero Jorge (en)

CNA: Secur0 CNA (en)

CNA: Kovid Goyal (en)

Additional Advisory Data

Solutions

CNA: Upgrade to kitty 0.49.0 or later.

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report