CVE-2023-45663
published medium CVSS 3.1 · 5.3Disclosure of uninitialized memory in stbi__tga_load in stb_image
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| nothings | — | stb<= 2.28 | Affected | Not stated | GitHub_M |
| nothings | — | stb_image0 through 2.28 · Other versions: unknown | Affected | Not stated | CISA-ADP |
| Alpine Linux | edge | stb | Fixed | 0_git20231012-r0 | Package fix record |
| Alpine Linux | v3.19 | stb | Fixed | 0_git20231012-r0 | Package fix record |
| Alpine Linux | v3.20 | stb | Fixed | 0_git20231012-r0 | Package fix record |
| Alpine Linux | v3.21 | stb | Fixed | 0_git20231012-r0 | Package fix record |
| Alpine Linux | v3.22 | stb | Fixed | 0_git20231012-r0 | Package fix record |
| Alpine Linux | v3.23 | stb | Fixed | 0_git20231012-r0 | Package fix record |
Show 1 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Alpine Linux | v3.24 | stb | Fixed | 0_git20231012-r0 | Package fix record |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 5.3 / 10
- Severity
- medium
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| nothings | stb | <= 2.28 (affected) | GitHub_M · cna |
| nothings | stb_image | 0 through 2.28 (affected · custom)Default: unknown | CISA-ADP · adp |
Weaknesses
1- CWE-908 CWE-908: Use of Uninitialized Resource
References
7- https://github.com/nothings/stb/blob/5736b15f7ea0ffb08dd38af21067c314d6a3aae9/stb_image.h#L1664
- https://github.com/nothings/stb/blob/5736b15f7ea0ffb08dd38af21067c314d6a3aae9/stb_image.h#L5936C10-L5936C20
- https://github.com/nothings/stb/blob/5736b15f7ea0ffb08dd38af21067c314d6a3aae9/stb_image.h#L7221
- https://lists.fedoraproject.org/archives/list/[email protected]/message/NMXKOKPP4BKTNUTF5KSRDQAWOUILQZNO/
- https://lists.fedoraproject.org/archives/list/[email protected]/message/QVABVF4GEM6BYD5L4L64RCRSXUHY6LGN/
- https://lists.fedoraproject.org/archives/list/[email protected]/message/UVQ7ONFH5GWLMXYEAJG32A3EUKUCEVCR/
- https://securitylab.github.com/advisories/GHSL-2023-145_GHSL-2023-151_stb_image_h/
Provider assertions
3GitHub_M · cna
Disclosure of uninitialized memory in stbi__tga_load in stb_image
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- bc3bdcf682b27df8dbab183636b543aec973bceabb56a8ef452a1d31ecd37a94
- Ingested
- 23 Sep 2026, 08:12:31 UTC
- Source record
- Official CVE record