Integer Overflow or Wraparound Affecting kovidgoyal/kitty package, versions [,0.47.0)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.29% (21st percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Integer Overflow or Wraparound vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-UNMANAGED-KOVIDGOYALKITTY-16779144
  • published20 May 2026
  • disclosed20 May 2026
  • creditRajChowdhury240, rlarabee, dr34mhacks

Introduced: 20 May 2026

CVE-2026-33642  (opens in a new tab)
CWE-190  (opens in a new tab)

How to fix?

Upgrade kovidgoyal/kitty to version 0.47.0 or higher.

Overview

Affected versions of this package are vulnerable to Integer Overflow or Wraparound via the handle_compose_command() 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 x_offset/y_offset values that pass the bounds check after wrapping but cause massive out-of-bounds heap memory access in compose_rectangles(). 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.

CVSS Base Scores

version 4.0
version 3.1