Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessDeliver malicious animated GIF
-
ExploitUser opens file in vulnerable application
-
Executionlibsixel parses first frame
-
ImpactApplication callback ret
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Memory lifecycle management
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Privilege Escalation The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Attacker must supply a malformed animated GIF file to an application using libsixel versions 1.8.7 and prior that calls sixel_frame_ref() to retain frames and sixel_frame_get_pixels() to access pixel buffers during GIF decoding via load_gif(). |
| Impact | The CVSS 3.1 score of 7.0 (High) reflects significant constraints that reduce real-world exploitability despite the severe technical impact. The attack vector is local (AV:L) requiring the attacker to convince a user to process a malicious GIF file, with high attack complexity (AC:H) and required user interaction (UI:R). The vulnerability requires no privileges (PR:N) but depends on specific API usage patterns that may not be present in all libsixel-consuming applications. No public exploit identified at time of analysis and no CISA KEV listing, indicating this is not yet actively exploited in the wild. The technical impact is maximal with high confidentiality, integrity, and availability impact (C:H/I:H/A:H), as heap use-after-free vulnerabilities are often exploitable for arbitrary code execution given sufficient attacker control over heap layout and freed memory contents. The deterministic nature of the bug (every second frame in an animated GIF triggers the condition) makes it highly reliable for causing crashes, though weaponization for code execution would require heap feng shui techniques and depends on the victim application's memory allocator behavior. Priority should be elevated for applications that process untrusted GIF files from external sources (image viewers, web browsers with libsixel backends, server-side image processors), but is lower for applications only processing trusted local content. The availability of a vendor patch in version 1.8.7-r1 provides clear remediation, reducing residual risk for organizations that can update promptly. |
| Exploit ScenarioDerived | An attacker crafts a malicious animated GIF file with at least two frames and distributes it via email attachment, web download, or file sharing service. When a victim opens this file in an application using libsixel with multi-frame callback processing (such as a SIXEL-enabled terminal emulator or image viewer), the load_gif() function processes the first frame normally, but upon decoding the second frame, gif_init_frame() frees the frame->pixels buffer that the application's callback code still references. The application subsequently dereferences this dangling pointer when accessing pixel data, triggering a use-after-free condition that minimally causes a crash. With careful heap manipulation by controlling the GIF structure and timing, an attacker with deep understanding of the target application's heap allocator could potentially achieve arbitrary code execution by placing controlled data in the freed memory region before it is accessed. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Apr 14, 2026
Heap use-after-free in libsixel 1.8.7 and earlier allows local code execution when processing malicious animated GIF files through the sixel_helper_load_image_file() API with multi-frame callbacks. The vulnerability triggers when gif_init_frame() unconditionally frees and reallocates frame->pixels between frames while client code retains references via the documented sixel_frame_ref() API, creating dangling pointers confirmed by AddressSanitizer. Fixed in version 1.8.7-r1. No public exploit iden
Earlier versions of this analysis (1)
Heap use-after-free in libsixel 1.8.7 and earlier allows local code execution when processing malicious animated GIF files through the sixel_helper_load_image_file() API with multi-frame callbacks. The vulnerability triggers when gif_init_frame() unconditionally frees and reallocates frame->pixels between frames while client code retains references via the documented sixel_frame_ref() API, creating dangling pointers confirmed by AddressSanitizer. Fixed in version 1.8.7-r1. No public exploit identified at time of analysis, though the memory corruption is deterministic and impacts any application processing user-supplied animated GIFs through the affected API surface.
RemediationAI
Upgrade immediately to libsixel version 1.8.7-r1 or later, which contains the complete fix for this use-after-free vulnerability as confirmed in the release notes at https://github.com/saitoha/libsixel/releases/tag/v1.8.7-r1. Organizations should inventory all applications that depend on libsixel either directly or through transitive dependencies and prioritize updates for systems that process untrusted GIF files from external sources. If immediate patching is not feasible, implement defense-in-depth controls including input validation to reject animated GIFs if only static images are required, sandboxing of image processing operations using operating system primitives like seccomp or pledge, and application of memory-safety mitigations such as heap hardening features available in modern allocators. For development teams building applications on libsixel, avoid using multi-frame callbacks with sixel_helper_load_image_file() until upgrade is complete, or implement custom GIF parsing that does not rely on the vulnerable frame reuse pattern. Consult the GitHub Security Advisory at https://github.com/saitoha/libsixel/security/advisories/GHSA-w46f-jr9f-rgvp for additional vendor guidance and workaround recommendations.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
This is a classic use-after-free vulnerability (CWE-416) in libsixel's GIF decoding pipeline, specifically in the load_gif() function within fromgif.c. The core issue stems from an object lifetime management flaw: the library reuses a single sixel_frame_t object across all frames of an animated GIF, but gif_init_frame() unconditionally calls free() and realloc() on the frame->pixels buffer between frames without checking reference counts. The public API explicitly provides sixel_frame_ref() to increment reference counts and sixel_frame_get_pixels() to access the raw pixel buffer, establishing a documented usage pattern where client code legitimately retains frame references across callbacks. When the second frame is decoded, the unconditional deallocation invalidates all previously-returned pixel buffer pointers, creating a dangling pointer condition. Applications using sixel_helper_load_image_file() with multi-frame callbacks follow this pattern and will dereference freed heap memory, producing ASAN-confirmed heap corruption. The vulnerability represents a fundamental violation of object ownership semantics in a C library with manual memory management.
Know when Libsixel gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
Sources disagree (Low–High)AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
vuln.today treats the vendor’s rating as authoritative. A higher third-party CVSS (e.g. CISA-ADP) is shown for transparency but does not drive the headline severity.
CVSS VectorVendor: github
Lifecycle Timeline
4DescriptionCVE.org
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.
Executive ViewAI
libsixel versions 1.8.7 and earlier contain a heap use-after-free vulnerability that allows local attackers to execute arbitrary code by processing specially crafted animated GIF files. This impacts applications using libsixel's image processing APIs, particularly those handling untrusted image inputs from users or external sources, potentially compromising system integrity and data confidentiality.
Apply vendor patch. Until patching is complete: restrict processing of animated GIF files to trusted sources only, implement application-level input validation to reject multi-frame GIF files where possible, and consider disabling sixel image processing features if not critical to business operations.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Use-after-free vulnerabilities occur when a program continues to access memory through a pointer after that memory has been deallocated.
Memory corruption occurs when a program writes data beyond the boundaries of allocated memory regions or accesses memory in unintended ways, violating the integrity of the process's address space.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
An issue was discovered in libsixel 1.8.4. Rated high severity (CVSS 8.8), this vulnerability is remotely exploitable, n
An issue was discovered in libsixel 1.8.4. Rated high severity (CVSS 8.8), this vulnerability is remotely exploitable, n
libsixel 1.8.4 has an integer overflow in sixel_frame_resize in frame.c. Rated high severity (CVSS 8.8), this vulnerabil
libsixel 1.10.0 is vulnerable to Use after free in libsixel/src/dither.c:379. Rated high severity (CVSS 8.8), this vulne
Libsixel 1.8.3 contains a heap-based buffer overflow in the sixel_encode_highcolor function in tosixel.c. Rated high sev
Libsixel 1.8.2 contains a heap-based buffer overflow in the dither_func_fs function in tosixel.c. Rated high severity (C
An issue was discovered in libsixel 1.8.2. Rated high severity (CVSS 8.8), this vulnerability is remotely exploitable, n
stb_image.h (aka the stb image loader) 2.23, as used in libsixel and other products, has a heap-based buffer over-read i
libsixel before 1.10 is vulnerable to Buffer Overflow in libsixel/src/quant.c:867. Rated high severity (CVSS 8.8), this
libsixel 1.8.6 is affected by Buffer Overflow in libsixel/src/quant.c:876. Rated high severity (CVSS 8.8), this vulnerab
libsixel 1.8.6 suffers from a Heap Use After Free vulnerability in in libsixel/src/dither.c:388. Rated high severity (CV
In libsixel v1.8.2, there is a heap-based buffer over-read in the function load_jpeg() in the file loader.c, as demonstr
EUVD-2026-22740
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB