CVE-2026-33018: saitoha libsixel use-after-free in load_gif

CVE-2026-33018 · Severity: high · CVSS 7 · Published 2026-04-14

libsixel is a library used to encode and decode images into the SIXEL format, often used for displaying graphics in terminal emulators. A security flaw in how the library handles animated GIF files allows a specially crafted image to cause the software to crash or potentially execute unauthorized code. This occurs when the library incorrectly manages memory while processing multiple frames of an animation, leading to a situation where the application tries to use memory that has already been cleared.

Technologies: Saitoha Libsixel. Vendors: Saitoha.

Quick answers

Is CVE-2026-33018 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-33018 being exploited in the wild.
How severe is CVE-2026-33018?
High severity, with a CVSS score of 7, published 14 April 2026.
Which products and versions are affected?
Saitoha Libsixel <= 1.8.7.
Is there a fix for CVE-2026-33018?
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-33018 attacked?
It is attacked with local access, in a software library.
Am I affected by CVE-2026-33018?
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

A use-after-free vulnerability exists in the load_gif() function within fromgif.c of libsixel. The root cause is that a single sixel_frame_t object is reused for all frames of an animated GIF, and the gif_init_frame() function unconditionally frees and reallocates the frame->pixels buffer between frames without checking the object's reference count. If an application uses the documented sixel_frame_ref() and sixel_frame_get_pixels() APIs within a callback, it will be left with a dangling pointer once the second frame is decoded. An attacker can exploit this by providing a crafted animated GIF to an application using sixel_helper_load_image_file() with a multi-frame callback. This 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

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.