Skip to main content

Libsixel CVE-2026-33018

| EUVDEUVD-2026-22740 HIGH
Use After Free (CWE-416)
2026-04-14 security-advisories@github.com
High
Disputed · 7.0 Vendor: github
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Deliver malicious animated GIF
  2. Exploit
    User opens file in vulnerable application
  3. Execution
    libsixel parses first frame
  4. Impact
    Application 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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)
v1 Apr 14, 2026 - 22:40 CVSS 7.0

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

libsixel < 1.8.7-rc1

Affected Packages

euvd libsixel fix: 1.8.7-rc1

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)
Vendor (github) PRIMARY 7.0 HIGH
AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
SUSE 3.1 LOW
AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
Red Hat 7.0 MEDIUM

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

Attack Vector
Local
Attack Complexity
High
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

4
Patch released
Apr 23, 2026 - 14:48 nvd
Patch available
Analysis Updated
Apr 16, 2026 - 05:56 EUVD-patch-fix
executive summary
Patch available
Apr 16, 2026 - 05:29 EUVD
1.8.7-rc1
CVE Published
Apr 14, 2026 - 22:16 nvd
HIGH 7.0

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

Why It Matters

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.

Business Impact: High
Compensating Controls

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

EPSS Score
0.0%
Top 97% exploitable
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor GitHub

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
Poc
System Exposure· derived
Small
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

35
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +35
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

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.

CVE-2019-20140 HIGH POC
8.8 Dec 30

An issue was discovered in libsixel 1.8.4. Rated high severity (CVSS 8.8), this vulnerability is remotely exploitable, n

CVE-2019-20094 HIGH POC
8.8 Dec 30

An issue was discovered in libsixel 1.8.4. Rated high severity (CVSS 8.8), this vulnerability is remotely exploitable, n

CVE-2019-20205 HIGH POC
8.8 Jan 02

libsixel 1.8.4 has an integer overflow in sixel_frame_resize in frame.c. Rated high severity (CVSS 8.8), this vulnerabil

CVE-2021-41715 HIGH POC
8.8 Apr 08

libsixel 1.10.0 is vulnerable to Use after free in libsixel/src/dither.c:379. Rated high severity (CVSS 8.8), this vulne

CVE-2020-21548 HIGH POC
8.8 Sep 17

Libsixel 1.8.3 contains a heap-based buffer overflow in the sixel_encode_highcolor function in tosixel.c. Rated high sev

CVE-2020-21547 HIGH POC
8.8 Sep 17

Libsixel 1.8.2 contains a heap-based buffer overflow in the dither_func_fs function in tosixel.c. Rated high severity (C

CVE-2019-19778 HIGH POC
8.8 Dec 13

An issue was discovered in libsixel 1.8.2. Rated high severity (CVSS 8.8), this vulnerability is remotely exploitable, n

CVE-2019-19777 HIGH POC
8.8 Dec 13

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

CVE-2021-40656 HIGH POC
8.8 Apr 08

libsixel before 1.10 is vulnerable to Buffer Overflow in libsixel/src/quant.c:867. Rated high severity (CVSS 8.8), this

CVE-2022-27044 HIGH POC
8.8 Apr 08

libsixel 1.8.6 is affected by Buffer Overflow in libsixel/src/quant.c:876. Rated high severity (CVSS 8.8), this vulnerab

CVE-2022-27046 HIGH POC
8.8 Apr 08

libsixel 1.8.6 suffers from a Heap Use After Free vulnerability in in libsixel/src/dither.c:388. Rated high severity (CV

CVE-2019-3574 HIGH POC
7.8 Jan 02

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

Vendor StatusVendor

SUSE

Severity: Low

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy