Description
An exploitable code execution vulnerability exists in the XPM image rendering function of SDL2_image 2.0.4. A specially crafted XPM image can cause an integer overflow in the colorhash function, allocating too small of a buffer. This buffer can then be written out of bounds, resulting in a heap overflow, ultimately ending in code execution. An attacker can display a specially crafted image to trigger this vulnerability.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| — | SDL | SDL_image 2.0.4 | — |
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 | libsdl2-image | 2.0.5+dfsg1-1 | — |
| Debian 14 | sdl-image1.2 | 1.2.12-12 | — |
| Debian 13 | libsdl2-image | 2.0.5+dfsg1-1 | — |
| Debian 13 | sdl-image1.2 | 1.2.12-12 | — |
| Debian 12 | libsdl2-image | 2.0.5+dfsg1-1 | — |
| Debian 12 | sdl-image1.2 | 1.2.12-12 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 20.04 LTS | libsdl2-image | 2.0.5+dfsg1-1 | — |
| Ubuntu 18.04 LTS | libsdl2-image | No fix yet | — |
| Ubuntu 16.04 LTS | libsdl2-image | No fix yet | — |
Show 1 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 14.04 LTS | libsdl2-image | No fix yet | — |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SUSE Package Hub 15 SP1 | SDL2_image | 2.0.5-bp151.4.3.1 | openSUSE-SU-2019:2108-1 |
| SUSE Package Hub 15 SP1 | SDL_image | 1.2.12+hg695-bp151.4.3.1 | openSUSE-SU-2019:2109-1 |
| SUSE Package Hub 15 | SDL2_image | 2.0.5-bp151.4.3.1 | openSUSE-SU-2019:2108-1 |
| SUSE Package Hub 15 | SDL_image | 1.2.12+hg695-bp151.4.3.1 | openSUSE-SU-2019:2109-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Leap 15.1 | SDL2_image | 2.0.5-lp151.2.5.1 | openSUSE-SU-2019:2070-1 |
| openSUSE Leap 15.1 | SDL_image | 1.2.12+hg695-lp151.3.3.1 | openSUSE-SU-2019:2071-1 |
| openSUSE Leap 15.0 | SDL2_image | 2.0.5-lp151.2.5.1 | openSUSE-SU-2019:2070-1 |
| openSUSE Leap 15.0 | SDL_image | 1.2.12+hg695-lp151.3.3.1 | openSUSE-SU-2019:2071-1 |
Alpine
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.10 | sdl2_image | 2.0.5-r0 | — |
| Alpine v3.9 | sdl2_image | 2.0.5-r0 | — |
| Alpine v3.8 | sdl2_image | 2.0.5-r0 | — |
| Alpine v3.7 | sdl2_image | 2.0.5-r0 | — |
Advisories 4
- openSUSE-SU-2019:2108-1 Security update for SDL2_image SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2019:2109-1 Security update for SDL_image SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2019:2070-1 Security update for SDL2_image SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2019:2071-1 Security update for SDL_image SUSE / openSUSE Security Updates · May 7, 2025
References
- openSUSE-SU-2019:2070 vendor-advisory
- openSUSE-SU-2019:2071 vendor-advisory
- openSUSE-SU-2019:2109 vendor-advisory
- openSUSE-SU-2019:2108 vendor-advisory
- https://talosintelligence.com/vulnerability_reports/TALOS-2019-0844