CVE-2026-33020 libsixel: Integer Overflow in write_png_to_file() leads to Heap-based Buffer Overflow

High 7.1 Published Updated

An integer overflow in libsixel allows attackers to cause heap corruption and potential code execution via crafted images.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2026-33020?

CVE-2026-33020 is a high-severity vulnerability in saitoha libsixel, published on 14 Apr 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

Official 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.

Weakness: CWE-190, CWE-122

Which versions are affected by CVE-2026-33020?

It affects 1 product.

Products include Saitoha Libsixel.

How do I fix CVE-2026-33020?

Upgrade to a fixed version.

Is CVE-2026-33020 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-33020 exists.

Sources

Also known as DEBIAN-CVE-2026-33020, GHSA-2xgm-4x47-2x2p, UBUNTU-CVE-2026-33020.

Is CVE-2026-33020 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free