Skip to content
OpenAdvisories
High · 7.1 CVE-2026-35444 EUVD-2026-19527

SDL_image has a heap buffer overflow READ via unchecked colormap index in XCF loader

Published Apr 6, 2026 · Updated Apr 8, 2026 · Assigned by GitHub_M

Description

SDL_image is a library to load images of various formats as SDL surfaces. In do_layer_surface() in src/IMG_xcf.c, pixel index values from decoded XCF tile data are used directly as colormap indices without validating them against the colormap size (cm_num). A crafted .xcf file with a small colormap and out-of-range pixel indices causes heap out-of-bounds reads of up to 762 bytes past the colormap allocation. Both IMAGE_INDEXED code paths are affected (bpp=1 and bpp=2). The leaked heap bytes are written into the output surface pixel data, making them potentially observable in the rendered image. This vulnerability is fixed with commit 996bf12888925932daace576e09c3053410896f8.

Affected products

VendorProductAffectedFixed
libsdl-org SDL_image < 996bf12888925932daace576e09c3053410896f8 —

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.

ReleasePackageFixed inAdvisory
Debian 14 libsdl2-image 2.8.10+dfsg-1 —
Debian 14 libsdl3-image 3.4.2+ds-1 —
Debian 14 sdl-image1.2 No fix yet —
Debian 13 libsdl2-image 2.8.8+dfsg-1+deb13u1 —
Debian 13 libsdl3-image 3.2.4+ds-1+deb13u1 —
Debian 13 sdl-image1.2 No fix yet —
Debian 12 sdl-image1.2 +1 No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 sdl-image1.2 +2 No fix yet —
Ubuntu 26.04 LTS sdl-image1.2 +2 No fix yet —
Ubuntu 25.10 sdl-image1.2 +2 No fix yet —
Ubuntu 24.04 LTS sdl-image1.2 +1 No fix yet —
Ubuntu 22.04 LTS sdl-image1.2 +1 No fix yet —
Show 4 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu 20.04 LTS sdl-image1.2 +1 No fix yet —
Ubuntu 18.04 LTS sdl-image1.2 +1 No fix yet —
Ubuntu 16.04 LTS sdl-image1.2 +1 No fix yet —
Ubuntu Pro 14.04 LTS sdl-image1.2 +1 No fix yet —
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed SDL2_image 2.8.10-1.1 openSUSE-SU-2026:10494-1
openSUSE Tumbleweed SDL3_image 3.4.2-1.1 openSUSE-SU-2026:10493-1

Advisories 2

References