CVE-2026-33018
Received Received - Intake
Use-After-Free in libsixel GIF Decoder Risks Code Execution

Publication date: 2026-04-14

Last updated on: 2026-04-23

Assigner: GitHub, Inc.

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 via the load_gif() function in fromgif.c, where a single sixel_frame_t object is reused across all frames of an animated GIF and gif_init_frame() unconditionally frees and reallocates frame->pixels between frames without consulting the object's reference count. Because the public API explicitly provides sixel_frame_ref() to retain a frame and sixel_frame_get_pixels() to access the raw pixel buffer, a callback following this documented usage pattern will hold a dangling pointer after the second frame is decoded, resulting in a heap use-after-free confirmed by ASAN. Any application using sixel_helper_load_image_file() with a multi-frame callback to process user-supplied animated GIFs is affected, with a reliable crash as the minimum impact and potential for code execution. This issue has been fixed in version 1.8.7-r1.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-04-14
Last Modified
2026-04-23
Generated
2026-05-07
AI Q&A
2026-04-15
EPSS Evaluated
2026-05-05
NVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
saitoha libsixel to 1.8.7-r1 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-416 The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory "belongs" to the code that operates on the new pointer.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

The vulnerability is a Use-After-Free issue in libsixel versions 1.8.7 and earlier, specifically in the load_gif() function. It occurs because a single sixel_frame_t object is reused across all frames of an animated GIF, and the function gif_init_frame() frees and reallocates the pixel buffer without checking the object's reference count. This leads to a situation where a callback holding a reference to the pixel buffer ends up with a dangling pointer after decoding the second frame, causing a heap use-after-free.


How can this vulnerability impact me? :

Any application using the sixel_helper_load_image_file() function with a multi-frame callback to process user-supplied animated GIFs is affected. The minimum impact is a reliable crash of the application. More severe impacts include the potential for arbitrary code execution, which could compromise the security and stability of the affected system.


What immediate steps should I take to mitigate this vulnerability?

To mitigate this vulnerability, update libsixel to version 1.8.7-r1 or later, where the Use-After-Free issue in the load_gif() function has been fixed.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart