CVE-2026-35444 Details
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.
A heap buffer overflow vulnerability has been identified in the SDL_image library, specifically in the XCF image loader. The issue arises in the do_layer_surface() function within src/IMG_xcf.c, where pixel index values from decoded XCF tile data are used as colormap indices without proper validation against the colormap size. This flaw allows a crafted .xcf file with a small colormap and out-of-range pixel indices to cause heap out-of-bounds reads of up to 762 bytes past the colormap allocation. The vulnerability affects all versions of SDL_image prior to the patch in commit 996bf12. Both IMAGE_INDEXED code paths are impacted (bpp=1 and bpp=2). The leaked heap bytes are written into the output surface pixel data, potentially making them visible in the rendered image.
Users can update to the patched version in commit 996bf12888925932daace576e09c3053410896f8 to address this vulnerability.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Apr 8, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/libsdl-org/SDL_image/security/advisories/GHSA-gq8w-x74c-h6p7 | [email protected] | PatchVendor Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-125 | Out-of-bounds Read | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| libsdl sdl image | < 2026-04-02 |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jul 24, 2026 | CVE Translated | [email protected] |
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Apr 16, 2026 | Initial Analysis | [email protected] |
| Apr 6, 2026 | New CVE Received | [email protected] |