{"id":"CVE-2026-33642","summary":"Kitty has a Heap Buffer Over-Read/Write via Integer Overflow in compose_rectangles Bounds Check","details":"Kitty is a cross-platform GPU based terminal. In versions 0.46.2 and below, 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.","aliases":["GHSA-qfgm-2c64-6x3x"],"modified":"2026-08-21T09:27:07.991601633Z","published":"2026-05-19T18:04:42.482Z","related":["openSUSE-SU-2026:21599-1"],"database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/33xxx/CVE-2026-33642.json","cna_assigner":"GitHub_M","cwe_ids":["CWE-125","CWE-190","CWE-787"]},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/33xxx/CVE-2026-33642.json"},{"type":"ADVISORY","url":"https://github.com/kovidgoyal/kitty/security/advisories/GHSA-qfgm-2c64-6x3x"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-33642"},{"type":"FIX","url":"https://github.com/kovidgoyal/kitty/commit/e9661f0f3afb4e4dbffa509adfb3df3c9780ad34"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/kovidgoyal/kitty","events":[{"introduced":"0"},{"fixed":"eadec09d499b6a1332fc75960a51abb1645d26ab"},{"fixed":"e9661f0f3afb4e4dbffa509adfb3df3c9780ad34"}],"database_specific":{"cpe":"cpe:2.3:a:kovidgoyal:kitty:*:*:*:*:*:*:*:*","extracted_events":[{"introduced":"0"},{"fixed":"0.47.0"}],"source":["CPE_RANGE","REFERENCES"]}}],"versions":["v0.46.2","v0.46.1","v0.46.0","nightly","v0.45.0","v0.44.0","v0.43.1","v0.43.0","v0.42.2","v0.42.1","v0.42.0","v0.41.1","v0.41.0","v0.40.1","v0.40.0","v0.39.1","v0.39.0","v0.38.1","v0.38.0","v0.37.0","v0.36.4","v0.36.3","v0.36.2","v0.36.1","v0.36.0","v0.35.2","v0.35.1","v0.35.0","v0.34.1","v0.34.0","v0.33.1","v0.33.0","v0.32.2","v0.32.1","v0.32.0","v0.31.0","v0.30.1","v0.30.0","v0.29.2","v0.29.1","v0.29.0","v0.28.1","v0.28.0","v0.27.1","v0.27.0","v0.26.5","v0.26.4","v0.26.3","v0.26.2","v0.26.1","v0.26.0","v0.25.2","v0.25.1","v0.25.0","v0.24.4","v0.24.3","v0.24.2","v0.24.1","v0.24.0","v0.23.1","v0.23.0","v0.22.2","v0.22.1","v0.22.0","v0.21.2","v0.21.1","v0.21.0","v0.20.3","v0.20.2","v0.20.1","v0.20.0","v0.19.3","v0.19.2","v0.19.1","v0.19.0","v0.18.3","v0.18.2","v0.18.1","v0.18.0","v0.17.4","v0.17.3","v0.17.2","v0.17.1","v0.17.0","v0.16.0","v0.15.1","v0.15.0","v0.14.6","v0.14.5","v0.14.4","v0.14.3","v0.14.2","v0.14.1","v0.14.0","v0.13.3","v0.13.2","v0.13.1","v0.13.0","v0.12.3","v0.12.2","v0.12.1","v0.12.0","v0.11.3","v0.11.2","v0.11.1","v0.11.0","v0.10.1","v0.10.0","v0.9.1","v0.9.0","v0.8.4","v0.8.3","v0.8.2","v0.8.1","v0.8.0","v0.7.1","v0.7.0","v0.6.1","v0.6.0","v0.5.1","v0.5.0","v0.4.2","v0.4.1","v0.4.0","v0.3.0","v0.2.8","v0.2.7","v0.2.6","v0.2.5","v0.2.4","v0.2.3","v0.2.2","v0.2.1","v0.2.0","v0.1.0"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-33642.json","vanir_signatures_modified":"2026-08-12T15:33:28Z","vanir_signatures":[{"signature_type":"Function","signature_version":"v1","source":"https://github.com/kovidgoyal/kitty/commit/e9661f0f3afb4e4dbffa509adfb3df3c9780ad34","target":{"file":"kitty/graphics.c","function":"handle_compose_command"},"deprecated":false,"digest":{"function_hash":"280457416764156885754909861011681358664","length":2849},"id":"CVE-2026-33642-82a3527e"},{"target":{"file":"kitty/graphics.c"},"deprecated":false,"digest":{"line_hashes":["280709711047299294137574032014209459525","85346557336307736872440387771568660609","170879151890253140071227728881778440264","317350391922474406785069908614255195877","133081243175796015896384702204921414521","236223751530012832227288039874492638852"],"threshold":0.9},"id":"CVE-2026-33642-dc1e4042","signature_type":"Line","signature_version":"v1","source":"https://github.com/kovidgoyal/kitty/commit/e9661f0f3afb4e4dbffa509adfb3df3c9780ad34"}]}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:H"}]}