CVE-2023-45664
published high CVSS 3.1 · 7.3Double-free in stbi__load_gif_main_outofmem 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. A crafted image file can trigger `stbi__load_gif_main_outofmem` attempt to double-free the out variable. This happens in `stbi__load_gif_main` because when the `layers * stride` value is zero the behavior is implementation defined, but common that realloc frees the old memory and returns null pointer. Since it attempts to double-free the memory a few lines below the first “free”, the issue can be potentially exploited only in a multi-threaded environment. In the worst case this may lead to code execution.
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
- 7.3 / 10
- Severity
- high
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
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-415 CWE-415: Double Free
References
5- https://github.com/nothings/stb/blob/5736b15f7ea0ffb08dd38af21067c314d6a3aae9/stb_image.h#L6993-L6995
- 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
Double-free in stbi__load_gif_main_outofmem in stb_image
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- ba4b5fab9ed8d7531034b2fa1950db114b8f4d44ca0498c04eaf94046ab7e5cf
- Ingested
- 23 Sep 2026, 08:12:31 UTC
- Source record
- Official CVE record