CVE-2026-33021
JSON

7.3high

libsixel: Use-after-free in sixel_encoder_encode_bytes()

Severity
7.3high CVSS:3.1 by GitHub_M
Exploit likelihood
0.26% (higher than 18% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M

Description

libsixel is a SIXEL encoder/decoder implementation derived from kmiya's sixel. Versions 1.8.7 and prior contain a use-after-free vulnerability in sixel_encoder_encode_bytes() because sixel_frame_init() stores the caller-owned pixel buffer pointer directly in frame->pixels without making a defensive copy. When a resize operation is triggered, sixel_frame_convert_to_rgb888() unconditionally frees this caller-owned buffer and replaces it with a new internal allocation, leaving the caller with a dangling pointer. Any subsequent access to the original buffer by the caller constitutes a use-after-free, confirmed by AddressSanitizer. An attacker who controls incoming frames can trigger this bug repeatedly and predictably, resulting in a reliable crash with potential for code execution. This issue has been fixed in version 1.8.7-r1.

Affected

Product or packageVersionsReported by
saitoha libsixel< 1.8.7-r1, before 1.8.7-r1CVE List, NVD

Classification

CWE-416

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

What each source says

CVE List

libsixel is a SIXEL encoder/decoder implementation derived from kmiya's sixel. Versions 1.8.7 and prior contain a use-after-free vulnerability in sixel_encoder_encode_bytes() because sixel_frame_init() stores the caller-owned pixel buffer pointer directly in frame->pixels without making a defensive copy. When a resize operation is triggered, sixel_frame_convert_to_rgb888() unconditionally frees this caller-owned buffer and replaces it with a new internal allocation, leaving the caller with a dangling pointer. Any subsequent access to the original buffer by the caller constitutes a use-after-free, confirmed by AddressSanitizer. An attacker who controls incoming frames can trigger this bug repeatedly and predictably, resulting in a reliable crash with potential for code execution. This issue has been fixed in version 1.8.7-r1.

NVD (es)

libsixel es una implementación de codificador/decodificador SIXEL derivada de sixel de kmiya. Las versiones 1.8.7 y anteriores contienen una vulnerabilidad de uso después de liberación en sixel_encoder_encode_bytes() porque sixel_frame_init() almacena el puntero del búfer de píxeles propiedad del llamador directamente en frame -> pixels sin hacer una copia defensiva. Cuando se activa una operación de redimensionamiento, sixel_frame_convert_to_rgb888() libera incondicionalmente este búfer propiedad del llamador y lo reemplaza con una nueva asignación interna, dejando al llamador con un puntero colgante. Cualquier acceso posterior al búfer original por parte del llamador constituye un uso después de liberación, confirmado por AddressSanitizer. Un atacante que controla los fotogramas entrantes puede activar este error de forma repetida y predecible, lo que resulta en un fallo fiable con potencial para la ejecución de código. Este problema ha sido solucionado en la versión 1.8.7-r1.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-33021 changed 2026-04-16CVE Terms of Use
NVDCVE-2026-33021 changed 2026-07-25Public domain