{"id":"CVE-2026-33020","aliases":["DEBIAN-CVE-2026-33020","EUVD-2026-22744","GHSA-2xgm-4x47-2x2p","UBUNTU-CVE-2026-33020"],"status":"published","title":"libsixel: Integer Overflow in write_png_to_file() leads to Heap-based Buffer Overflow","description":"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.","severity":{"version":"3.1","score":7.1,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-11","score":0.00213,"percentile":0.11701,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-122","CWE-190"],"published":"2026-04-14T21:53:00Z","modified":"2026-10-28T02:30:29Z","fixes":[{"ecosystem":"Debian:14","package":"libsixel","fixed_in":["1:1.8.7-r2-1"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"Debian:12","package":"libsixel","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.10.3-3","1.10.5-1","1:1.8.7-1","1:1.8.7-2","1:1.8.7-3","1:1.8.7-4","1:1.8.7-5","1:1.8.7-6","1:1.8.7-r2-1"]},{"source":"osv","ecosystem":"Debian:13","package":"libsixel","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.10.5-1","1:1.8.7-1","1:1.8.7-2","1:1.8.7-3","1:1.8.7-4","1:1.8.7-5","1:1.8.7-6","1:1.8.7-r2-1"]},{"source":"osv","ecosystem":"Debian:14","package":"libsixel","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1:1.8.7-r2-1"}]}],"versions":["1.10.5-1","1:1.8.7-1","1:1.8.7-2","1:1.8.7-3","1:1.8.7-4","1:1.8.7-5","1:1.8.7-6"]},{"source":"osv","ecosystem":"Ubuntu:16.04:LTS","package":"libsixel","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.4.2-1","1.5.2-2"]},{"source":"osv","ecosystem":"Ubuntu:18.04:LTS","package":"libsixel","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.5.2-2","1.7.3-1"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"libsixel","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.8.2-1","1.8.2-2.1"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"libsixel","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.8.6-2","1.10.3-2","1.10.3-3"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"libsixel","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.10.3-3","1.10.3-3build1"]},{"source":"osv","ecosystem":"Ubuntu:25.10","package":"libsixel","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.10.5-1"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"libsixel","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.10.5-1build1","1:1.8.7-r2-1"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"libsixel","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.10.5-1","1.10.5-1build1"]}],"products":[{"vendor":"saitoha","product":"libsixel"}],"references":[{"url":"https://github.com/saitoha/libsixel/security/advisories/GHSA-2xgm-4x47-2x2p","tags":["x_refsource_CONFIRM","exploit","Exploit","Vendor Advisory","advisory","report"]},{"url":"https://github.com/saitoha/libsixel/releases/tag/v1.8.7-r1","tags":["x_refsource_MISC","Release Notes","web","report"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/33xxx/CVE-2026-33020.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-33020","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2026-33020","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2026-33020","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-33020","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2026-33020","title":"libsixel: Integer Overflow in write_png_to_file() leads to Heap-based Buffer Overflow","description":"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.","status":"published","published":"2026-04-14T21:53:00.388Z","modified":"2026-04-15T13:30:47.463Z","cvss":[{"version":"3.1","score":7.1,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H","level":"high","assessor":"cna"}],"cwes":["CWE-122","CWE-190"],"updated_at":"2026-11-02T14:20:08.009733Z"}],"euvd":[{"id":"EUVD-2026-22744","description":"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.","status":"published","published":"2026-04-14T21:53:00Z","modified":"2026-04-15T13:30:47Z","cvss":[{"version":"3.1","score":7.1,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T19:24:25.607055Z"}],"nvd":[{"id":"CVE-2026-33020","description":"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.","status":"published","published":"2026-04-14T22:16:30.543Z","modified":"2026-07-25T11:10:00.1Z","cvss":[{"version":"3.1","score":7.1,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H","level":"high","assessor":"secondary"}],"cwes":["CWE-122","CWE-190"],"updated_at":"2026-11-02T14:12:14.748836Z"}],"osv":[{"id":"CVE-2026-33020","title":"libsixel: Integer Overflow in write_png_to_file() leads to Heap-based Buffer Overflow","description":"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.","status":"published","published":"2026-04-14T21:53:00.388Z","modified":"2026-10-28T02:30:29.088716716Z","cvss":[{"version":"3.1","score":7.1,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H","level":"high"}],"cwes":["CWE-122","CWE-190"],"updated_at":"2026-11-02T15:45:01.548715Z"},{"id":"DEBIAN-CVE-2026-33020","description":"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. This issue has been fixed in version 1.8.7-r1.","status":"published","published":"2026-04-14T22:16:30.543Z","modified":"2026-10-01T03:03:10.292755881Z","cvss":[{"version":"3.1","score":7.1,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:45:54.587575Z"},{"id":"UBUNTU-CVE-2026-33020","description":"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. This issue has been fixed in version 1.8.7-r1.","status":"published","published":"2026-04-14T22:16:00Z","modified":"2026-10-17T12:59:58.534381265Z","cvss":[{"version":"3.1","score":7.1,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T16:56:16.036833Z"}]}}
