Description
libsixel before 1.8.7-r1 and 1.9.0 through 1.10.5 contains a heap out-of-bounds write vulnerability in gif_init_frame() in src/fromgif.c, which never checks the GIF transparent color index against the palette size. Attackers can supply a crafted GIF with a small color table and large transparent index, processed with a background color set, to write bytes past the palette buffer, causing heap corruption or crashes.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| saitoha | libsixel | < 1.8.7-r1, 1.9.0 – ≤ 1.10.5 | 1.8.7-r1 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | libsixel | 1:1.8.7-r2-1 | — |
| Debian 13 | libsixel | No fix yet | — |
| Debian 12 | libsixel | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | libsixel | No fix yet | — |
| Ubuntu 26.04 LTS | libsixel | No fix yet | — |
| Ubuntu 24.04 LTS | libsixel | No fix yet | — |
| Ubuntu 22.04 LTS | libsixel | No fix yet | — |
| Ubuntu 20.04 LTS | libsixel | No fix yet | — |
Show 2 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 18.04 LTS | libsixel | No fix yet | — |
| Ubuntu 16.04 LTS | libsixel | No fix yet | — |
References
- https://github.com/saitoha/libsixel/issues/220 issue-tracking
- https://github.com/saitoha/libsixel/commit/bdbab09816eb9188429c37a50b97c5e66dfe5047 patch
- libsixel v1.8.7-r1 Release Notes release-notes
- https://github.com/saitoha/libsixel/blob/v1.8.7/src/fromgif.c#L182-L248 technical-description
- https://github.com/libsixel/libsixel/blob/v1.10.5/src/fromgif.c#L219-L240 technical-description
- https://hackmd.io/@haind-pwn/libsixel-gif-transparent-index-oob-write third-party-advisory
- VulnCheck Advisory: libsixel before 1.8.7-r1 and 1.9.0 through 1.10.5 Heap Out-of-Bounds Write via GIF third-party-advisory