libsixel is a SIXEL encoder/decoder implementation derived from kmiya's sixel. From to 1.8.7-r1, a signed integer overflow in the SIXEL parser's image-buffer doubling loop can lead to an out-of-bounds heap write in sixel_decode_raw_impl. context->pos_x grows by repeat_count on every sixel character with no upper bound check. Once pos_x approaches INT_MAX, the expression "pos_x + repeat_count" used to size the image buffer overflows signed int. Depending on how the overflow wraps, the resize check that should reject oversized buffers can be bypassed, after which a subsequent write computes a large attacker-influenced offset into image->data and writes past the allocation. Reachable from any caller that decodes attacker-supplied SIXEL data, including img2sixel. This vulnerability is fixed in 1.8.7-r2.
Fix
Patch, vendor advisory and mitigation references on NVD 2
- https://github.com/saitoha/libsixel/security/advisories/GHSA-9jm7-77gr-qghv Exploit, Vendor Advisory
- https://github.com/saitoha/libsixel/security/advisories/GHSA-9jm7-77gr-qghv Exploit, Vendor Advisory
Every line above is quoted from NVD, CISA, Microsoft, the vendor's own advisory or DISA; nothing is generated.
Change history 1
- First seenCVSS 7.1 · saitohaNVD modified 2026-10-26 14:10
Affected (CPE criteria) 1
cpe:2.3:a:saitoha:libsixel:*:*:*:*:*:*:*:*
References 2
- https://github.com/saitoha/libsixel/security/advisories/GHSA-9jm7-77gr-qghv Exploit, Vendor Advisory
- https://github.com/saitoha/libsixel/security/advisories/GHSA-9jm7-77gr-qghv Exploit, Vendor Advisory