{"id":"CVE-2026-33020","aliases":["CVE-2026-33020"],"related":[],"kind":"vulnerability","state":"published","title":"libsixel: Integer Overflow in write_png_to_file() leads to Heap-based Buffer Overflow","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","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.","source":"cvelist"},{"lang":"es","text":"libsixel es una implementación de codificador/decodificador SIXEL derivada de sixel de kmiya. Las versiones 1.8.7 y anteriores contienen un desbordamiento de entero que conduce a un desbordamiento de búfer de montón a través de sixel_frame_convert_to_rgb888() en frame.c, donde los cálculos de tamaño de asignación y desplazamiento de puntero para imágenes paletizadas (PAL1, PAL2, PAL4) se realizan utilizando aritmética de enteros antes de la conversión a size_t. Para imágenes cuyo recuento de píxeles excede INT_MAX / 4, el desbordamiento produce una asignación de montón de tamaño insuficiente para el búfer de conversión y un desplazamiento de puntero negativo para el sub-búfer de normalización, después de lo cual sixel_helper_normalize_pixelformat() escribe los datos completos de la imagen comenzando desde el puntero inválido, causando una corrupción masiva del montón confirmada por ASAN. Un atacante que proporciona un PNG paletizado grande especialmente diseñado puede corromper el montón del proceso víctima, lo que resulta en un fallo fiable y una potencial ejecución de código arbitrario. Este problema ha sido solucionado en la versión 1.8.7-r1.","source":"nvd"}],"published":"2026-04-14T21:53:00.388Z","modified":"2026-07-25T11:10:00.100Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H","score":7.1,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H","score":7.1,"rating":"HIGH"}],"cwes":["CWE-122","CWE-190"],"affected":[{"ranges":[{"version":"< 1.8.7-r1","status":"affected"}],"vendor":"saitoha","product":"libsixel","source":"cvelist"},{"ranges":[{"status":"affected","fixed":"1.8.7-r1"}],"vendor":"saitoha","product":"libsixel","cpe":"cpe:2.3:a:saitoha:libsixel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/saitoha/libsixel/security/advisories/GHSA-2xgm-4x47-2x2p","tags":["exploit","vendor-advisory","x-refsource-confirm"],"sources":["cvelist","nvd"]},{"url":"https://github.com/saitoha/libsixel/releases/tag/v1.8.7-r1","tags":["release-notes","x-refsource-misc"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2026-04-15T13:30:43.489Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-33020","url":"https://www.cve.org/CVERecord?id=CVE-2026-33020","licence":"CVE Terms of Use","modified":"2026-04-15T13:30:47.463Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-33020","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-33020","licence":"Public domain","modified":"2026-07-25T11:10:00.100Z"}],"updatedAt":"2026-11-25T22:59:18.795Z","epss":{"score":0.00218,"percentile":0.13014,"date":"2026-12-01T12:00:22.000Z"}}