{"id":"CVE-2026-33020","published":"2026-04-14T21:53:00Z","modified":"2026-04-15T13:30:47Z","title":"libsixel: Integer Overflow in write_png_to_file() leads to Heap-based Buffer Overflow","vendor":"saitoha","product":"libsixel","tier":"tail","description":{"text":"libsixel is a SIXEL encoder/decoder implementation derived from kmiya's sixel. Versions 1.8.7 and prior contain an integer overflow which leads to a heap buffer overflow via sixel_frame_convert_to_rgb888() in frame.c, where allocation size and pointer offset computations for palettised images (PAL1, PAL2, PAL4) are performed using int arithmetic before casting to size_t. For images whose pixel count exceeds INT_MAX / 4, the overflow produces an undersized heap allocation for the conversion buffer and a negative pointer offset for the normalization sub-buffer, after which sixel_helper_normalize_pixelformat() writes the full image data starting from the invalid pointer, causing massive heap corruption confirmed by ASAN. An attacker providing a specially crafted large palettised PNG can corrupt the heap of the victim process, resulting in a reliable crash and potential arbitrary code execution.\nThis issue has been fixed in version 1.8.7-r1.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.1,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00233,"percentile":0.08507,"provenance":"source"},"cwes":[{"id":"CWE-122","name":"Heap-based Buffer Overflow"},{"id":"CWE-190","name":"Integer Overflow or Wraparound"}],"references":[{"url":"https://github.com/saitoha/libsixel/security/advisories/GHSA-2xgm-4x47-2x2p","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/saitoha/libsixel/releases/tag/v1.8.7-r1","tags":["x_refsource_MISC"]}],"priority":{"score":6.7,"factors":[{"name":"EPSS percentile","points":1.7},{"name":"CVSS severity","points":4.97}]},"vendorSlug":"saitoha","affectedVersions":[{"vendor":"saitoha","product":"libsixel","versions":["< 1.8.7-r1"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total","timestamp":"2026-04-15T13:30:43.489988Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2026-22744","exploited":false,"provenance":"source"}}