CVE-2026-44636
JSON

7.4high

libsixel: integer overflow in encoder

Severity
7.4high CVSS:3.1 by GitHub_M
Exploit likelihood
0.14% (higher than 2% of CVEs)
Published
Last changed
Assigned by
GitHub_M

Description

libsixel is a SIXEL encoder/decoder implementation derived from kmiya's sixel. From to 1.8.7-r1, signed integer overflow in sixel_encode_highcolor's allocation size calculation can lead to a heap buffer overflow. The public sixel_encode entry point validates only that width and height are greater than zero, with no upper bound. width and height are multiplied as plain int when computing the allocation size for paletted_pixels and normalized_pixels. Any caller that asks libsixel to encode a pixel buffer with width times height greater than INT_MAX (about 2.15 billion) will hit a wrapped allocation size; under the right wrap, the malloc succeeds with a buffer much smaller than the encoder expects, and the encoder writes past the end of the heap allocation. This vulnerability is fixed in 1.8.7-r2.

Affected

Product or packageVersionsReported by
saitoha libsixel>= 1.4.4, < 1.8.7-r2, from 1.4.4 before 1.8.7-r2CVE List, NVD

All scores

GitHub_M7.4high CVSS:3.1CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD7.8high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Classification

CWE-122CWE-190

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total.

What each source says

CVE List

libsixel is a SIXEL encoder/decoder implementation derived from kmiya's sixel. From to 1.8.7-r1, signed integer overflow in sixel_encode_highcolor's allocation size calculation can lead to a heap buffer overflow. The public sixel_encode entry point validates only that width and height are greater than zero, with no upper bound. width and height are multiplied as plain int when computing the allocation size for paletted_pixels and normalized_pixels. Any caller that asks libsixel to encode a pixel buffer with width times height greater than INT_MAX (about 2.15 billion) will hit a wrapped allocation size; under the right wrap, the malloc succeeds with a buffer much smaller than the encoder expects, and the encoder writes past the end of the heap allocation. This vulnerability is fixed in 1.8.7-r2.

NVD (es)

libsixel es una implementación de codificador/decodificador SIXEL derivada de sixel de kmiya. Desde hasta 1.8.7-r1, un desbordamiento de entero en el cálculo del tamaño de asignación de sixel_encode_highcolor puede conducir a un desbordamiento de búfer en el heap. El punto de entrada público sixel_encode valida solo que el ancho y el alto son mayores que cero, sin límite superior. El ancho y el alto se multiplican como un entero simple al calcular el tamaño de asignación para paletted_pixels y normalized_pixels. Cualquier llamador que pida a libsixel que codifique un búfer de píxeles con un ancho por alto mayor que INT_MAX (aproximadamente 2.15 mil millones) alcanzará un tamaño de asignación ajustado; bajo el ajuste correcto, el malloc tiene éxito con un búfer mucho más pequeño de lo que el codificador espera, y el codificador escribe más allá del final de la asignación del heap. Esta vulnerabilidad está corregida en 1.8.7-r2.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-44636 changed 2026-05-16CVE Terms of Use
NVDCVE-2026-44636 changed 2026-10-26Public domain