CVE-2026-33642: Kitty has a Heap Buffer Over-Read/Write via Integer Overflow in compose_rectangles Bounds Check
Kitty is a cross-platform GPU based terminal. In versions 0.46.2 and below, the handlecomposecommand() function in kitty/graphics.c performs bounds validation on composition offsets using unsigned 32-bit arithmetic that is subject to integer wrapping, potentially leading to Heap Buffer Over-Read/Write. An attacker who can write escape sequences to a kitty terminal (e.g., via a malicious file, SSH login banner, or piped content) can supply crafted xoffset/yoffset values that pass the bounds check after wrapping but cause massive out-of-bounds heap memory access in composerectangles(). No user interaction is required. No non-default configuration is required. The attacker only needs the ability to produce output in a kitty terminal window. This issue has been fixed in version 0.47.0.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/kittyto a version that resolves this vulnerability.Fixed in 0.19.3-1Fixed in 0.19.3-1+deb11u1Fixed in 0.41.1-2+deb13u1Fixed in 0.47.3-1Fixed in 0.47.4-1 - Upgrade
Upgrade
kittyto a version that resolves this vulnerability.Fixed in 0.47.0
Event History
Frequently Asked Questions
What is the severity of CVE-2026-33642?
CVE-2026-33642 is classified as a high severity vulnerability due to potential exploitation leading to arbitrary code execution.
How do I fix CVE-2026-33642?
To fix CVE-2026-33642, upgrade to version 0.46.3 or later of Kitty which includes the necessary patch.
What types of systems are affected by CVE-2026-33642?
CVE-2026-33642 affects Kitty versions 0.46.2 and below across all supported platforms.
What is the exploitation impact of CVE-2026-33642?
Exploiting CVE-2026-33642 could allow attackers to read or write beyond the intended memory bounds, potentially resulting in data corruption or execution of malicious code.
How can I determine if my version of Kitty is vulnerable to CVE-2026-33642?
You can determine if your version of Kitty is vulnerable to CVE-2026-33642 by checking if it is version 0.46.2 or earlier.