# CVE-2026-33020: saitoha libsixel heap overflow in sixel_frame_convert_to_rgb888

Source: https://junglewise.ai/threats/cve-2026-33020-saitoha-libsixel-heap-overflow-in-sixel-frame-convert-to-rgb888  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-04-14. Updated: 2026-07-25  
License: CC BY 4.0 with a link back

CVE-2026-33020 · Severity: high · CVSS 7.1 · Published 2026-04-14

libsixel is a software library used to encode and decode images into the SIXEL format, often used for displaying graphics in terminal environments. A vulnerability exists where processing a specially crafted, large image file can cause the application to crash or allow an attacker to execute unauthorized code. This occurs when the library incorrectly calculates memory requirements for high-resolution images, leading to memory corruption.

Technologies: [Saitoha Libsixel](https://junglewise.ai/threats/technologies/libsixel). Vendors: [Saitoha](https://junglewise.ai/threats/vendors/saitoha).

## Quick answers

**Is CVE-2026-33020 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-33020 being exploited in the wild.

**How severe is CVE-2026-33020?** High severity, with a CVSS score of 7.1, published 14 April 2026.

**Which products and versions are affected?** Saitoha Libsixel <= 1.8.7.

**Is there a fix for CVE-2026-33020?** A patch was published on 2026-04-14: Fixed in version 1.8.7-r1 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-33020 attacked?** It is attacked with local access, in a software library.

**Am I affected by CVE-2026-33020?** Check whether you run Saitoha Libsixel at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

An integer overflow exists in the `sixel_frame_convert_to_rgb888()` function within `frame.c`. When processing palettized images (PAL1, PAL2, PAL4), the library performs allocation size and pointer offset calculations using 32-bit integer arithmetic before casting the result to `size_t`. If an image's pixel count exceeds INT_MAX / 4, the calculation wraps around, resulting in an undersized heap allocation and a negative pointer offset. Subsequently, `sixel_helper_normalize_pixelformat()` writes image data to this invalid memory location, causing massive heap corruption. Exploitation requires a user to open a specially crafted PNG file using an application linked against the vulnerable library. The issue is fixed in version 1.8.7-r1.

## Affected products

- saitoha libsixel <= 1.8.7

## Timeline

- 2026-04-14: disclosed
- 2026-04-14: patched: Fixed in version 1.8.7-r1
- 2026-04-14: advisory

## References

- [https://github.com/saitoha/libsixel/releases/tag/v1.8.7-r1](https://github.com/saitoha/libsixel/releases/tag/v1.8.7-r1)
- [https://github.com/saitoha/libsixel/security/advisories/GHSA-2xgm-4x47-2x2p](https://github.com/saitoha/libsixel/security/advisories/GHSA-2xgm-4x47-2x2p)

## Related threats

- [saitoha libsixel NULL pointer dereference in sixel_decode_raw](https://junglewise.ai/threats/cve-2026-44638-saitoha-libsixel-null-pointer-dereference-in-sixel-decode-raw)
- [saitoha libsixel integer overflow in SIXEL parser](https://junglewise.ai/threats/cve-2026-44637-saitoha-libsixel-integer-overflow-in-sixel-parser)
- [saitoha libsixel heap buffer overflow in sixel_encode_highcolor](https://junglewise.ai/threats/cve-2026-44636-saitoha-libsixel-heap-buffer-overflow-in-sixel-encode-highcolor)
- [saitoha libsixel use-after-free in load_with_gdkpixbuf](https://junglewise.ai/threats/cve-2026-33023-saitoha-libsixel-use-after-free-in-load-with-gdkpixbuf)
- [saitoha libsixel use-after-free in sixel_encoder_encode_bytes](https://junglewise.ai/threats/cve-2026-33021-saitoha-libsixel-use-after-free-in-sixel-encoder-encode-bytes)
