CVE-2026-33019

libsixel: Integer overflow leads to Out-of-bounds Read in img2sixel

Published Apr 14, 2026 CVSS 3.1 · 7.1 High EPSS < 1% KEV · Not listed
Description
libsixel is a SIXEL encoder/decoder implementation derived from kmiya's sixel. Versions 1.8.7 and prior contain an integer overflow leading to an out-of-bounds heap read in the --crop option handling of img2sixel, where positive coordinates up to INT_MAX are accepted without overflow-safe bounds checking. In sixel_encoder_do_clip(), the expression clip_w + clip_x overflows to a large negative value when clip_x is INT_MAX, causing the bounds guard to be skipped entirely, and the unclamped coordinate is passed through sixel_frame_clip() to clip(), which computes a source pointer far beyond the image buffer and passes it to memmove(). An attacker supplying a specially crafted crop argument with any valid image can trigger an out-of-bounds read in the heap, resulting in a reliable crash and potential information disclosure. This issue has been fixed in version 1.8.7-r1.

Analysis

AI-generated

Technical impact

A bug in libsixel's img2sixel command causes an integer overflow when processing the --crop option. Positive coordinates up to INT_MAX are accepted without safe bounds checks, leading to a negative width calculation that skips the bounds guard. The resulting out‑of‑bounds read occurs during a memmove, causing a crash and exposing data from the heap. The flaw can disclose sensitive information present in the process memory. This is a classic out‑of‑bounds read (CWE‑125) exacerbated by an integer overflow (CWE‑190).

Affected Systems

The vulnerability affects the libsixel library version 1.8.7 and earlier distributed by saitoha. Any system that runs the img2sixel tool with the --crop parameter and provides a crafted coordinate can be impacted.

Risk and Exploitability

The CVSS base score is 7.1, indicating high severity. EPSS data is not available and the vulnerability is not listed in the CISA KEV catalog. An attacker would need to supply a specially crafted crop argument, which is typically a local user or a process that controls input to img2sixel. Based on the description, the attack vector is inferred to be local; there is no evidence of remote exploitation via network interfaces. The vulnerability is exploitable when input validation is bypassed, making it a reliable crash with the potential to leak memory contents.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade libsixel to version 1.8.7‑r1 or newer, which contains the patch for the integer overflow.
  • If an upgrade is not immediately possible, completely disable or remove usage of the --crop option when invoking img2sixel, or replace it with a validated wrapper that rejects coordinates outside the image bounds.
  • Validate any externally supplied crop coordinates before passing them to img2sixel to ensure they are within the image dimensions, thereby preventing the overflow.

Generated by OpenCVE AI on April 14, 2026 at 23:25 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
CPEs cpe:2.3:a:saitoha:libsixel:*:*:*:*:*:*:*:*
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Saitoha
Saitoha libsixel
Vendors & Products Saitoha
Saitoha libsixel
Type Values Removed Values Added
Description libsixel is a SIXEL encoder/decoder implementation derived from kmiya's sixel. Versions 1.8.7 and prior contain an integer overflow leading to an out-of-bounds heap read in the --crop option handling of img2sixel, where positive coordinates up to INT_MAX are accepted without overflow-safe bounds checking. In sixel_encoder_do_clip(), the expression clip_w + clip_x overflows to a large negative value when clip_x is INT_MAX, causing the bounds guard to be skipped entirely, and the unclamped coordinate is passed through sixel_frame_clip() to clip(), which computes a source pointer far beyond the image buffer and passes it to memmove(). An attacker supplying a specially crafted crop argument with any valid image can trigger an out-of-bounds read in the heap, resulting in a reliable crash and potential information disclosure. This issue has been fixed in version 1.8.7-r1.
Title libsixel: Integer overflow leads to Out-of-bounds Read in img2sixel
Weaknesses CWE-125
CWE-190
References
Metrics cvssV3_1

{'score': 7.1, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Apr 15, 2026, 8:02 PM
Reserved
Mar 17, 2026, 5:22 PM
Status
Analyzed
Published
Apr 14, 2026, 10:16 PM
Modified
Jul 25, 2026, 10:10 AM
Severity
Moderate
Public date
Apr 14, 2026, 9:49 PM