Skip to content
OpenAdvisories
Medium · 5.3 CVE-2023-45663 EUVD-2023-49954

Disclosure of uninitialized memory in stbi__tga_load in stb_image

Published Oct 20, 2023 · Updated Feb 13, 2025 · Assigned by GitHub_M

Description

stb_image is a single file MIT licensed library for processing images. The stbi__getn function reads a specified number of bytes from context (typically a file) into the specified buffer. In case the file stream points to the end, it returns zero. There are two places where its return value is not checked: In the `stbi__hdr_load` function and in the `stbi__tga_load` function. The latter of the two is likely more exploitable as an attacker may also control the size of an uninitialized buffer.

Affected products

VendorProductAffectedFixed
nothings stb <= 2.28 —

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 libstb No fix yet —
Debian 13 libstb No fix yet —
Debian 12 libstb No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 libstb No fix yet —
Ubuntu 26.04 LTS libstb No fix yet —
Ubuntu 25.10 libstb No fix yet —
Ubuntu 24.04 LTS libstb No fix yet —
Ubuntu 22.04 LTS libstb No fix yet —
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu 20.04 LTS libstb No fix yet —
ReleasePackageFixed inAdvisory
Alpine v3.24 stb 0_git20231012-r0 —
Alpine v3.23 stb 0_git20231012-r0 —
Alpine v3.22 stb 0_git20231012-r0 —
Alpine v3.21 stb 0_git20231012-r0 —
Alpine v3.20 stb 0_git20231012-r0 —
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Alpine v3.19 stb 0_git20231012-r0 —

References