---
id: "CVE-2026-117557"
kind: "vulnerability"
aliases: ["CVE-2026-117557"]
title: "SDL_image: crafted ILBM file reads past stack array in HAM mode"
severity: "medium"
cvss: 6.9
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["c", "c++", "games", "image-processing", "package", "sdl"]
not_affected_if: ["bundled-assets-only", "no-untrusted-lbm-input"]
published_at: "2026-10-27T14:16:37+00:00"
first_seen_at: "2026-10-27T14:32:19+00:00"
updated_at: "2026-10-27T14:33:02+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-117557", "first_seen_at": "2026-10-27T14:32:19+00:00"}]
---

# SDL_image: crafted ILBM file reads past stack array in HAM mode

SDL_image's IFF/ILBM image loader does not validate the bitplane count when HAM mode is set, so a crafted file with more than 8 bitplanes reads past a stack colormap array. An attacker can crash an application that opens the file or leak nearby stack memory.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the installed SDL_image version with `pkg-config --modversion SDL2_image` or the version constant in the bundled SDL_image headers.
- Check whether the application loads IFF/ILBM (.lbm) images through SDL_image.

## Fix

- Move SDL_image past the fixed release for the affected branch; the sources do not name the fixed version, so unknown.
- Until patched, do not load untrusted .lbm files through SDL_image.

## Timeline

- 2026-10-27T14:32:19+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-117557

## From the sources

SDL_image through 3.4.8 and through 2.8.12 contains a stack out-of-bounds read vulnerability in IMG_LoadLBM_IO() in src/IMG_lbm.c that skips bitplane count validation when HAM mode is set. Attackers can supply a crafted ILBM file with more than 8 HAM bitplanes to read past the colormap stack array, causing crashes or disclosing stack memory.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
