CVE-2026-35444: SDL_image has a heap buffer overflow READ via unchecked colormap index in XCF loader
SDLimage is a library to load images of various formats as SDL surfaces. In dolayersurface() in src/IMGxcf.c, pixel index values from decoded XCF tile data are used directly as colormap indices without validating them against the colormap size (cmnum). 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 IMAGEINDEXED 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 Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
SDL_image XCF loader (src/IMG_xcf.c do_layer_surface)to a version that resolves this vulnerability.Patch 996bf12888925932daace576e09c3053410896f8
Event History
Frequently Asked Questions
What is the severity of CVE-2026-35444?
CVE-2026-35444 has a critical severity level due to the potential for a heap buffer overflow leading to possible remote code execution.
How do I fix CVE-2026-35444?
To fix CVE-2026-35444, update SDL_image to the latest version released after April 2, 2026, which includes the necessary vulnerability patches.
What causes CVE-2026-35444?
CVE-2026-35444 is caused by unchecked colormap index values being used directly in the XCF loader, leading to a heap buffer overflow.
Which versions of SDL_image are affected by CVE-2026-35444?
All versions of SDL_image prior to the patch released on April 2, 2026, are affected by CVE-2026-35444.
Is there a public advisory for CVE-2026-35444?
Yes, a public advisory for CVE-2026-35444 is available on the SDL_image GitHub repository detailing the vulnerability and fixes.