CVE-2023-45675
published medium CVSS 3.1 · 6.50 byte write heap buffer overflow in start_decoder in stb_vorbis
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| nothings | — | stb<= 1.22 | Affected | Not stated | GitHub_M |
| nothings | — | stb0 through 1.22 · 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_vorbis is a single file MIT licensed library for processing ogg vorbis files. A crafted file may trigger out of bounds write in `f->vendor[len] = (char)'\0';`. The root cause is that if the len read in `start_decoder` is `-1` and `len + 1` becomes 0 when passed to `setup_malloc`. The `setup_malloc` behaves differently when `f->alloc.alloc_buffer` is pre-allocated. Instead of returning `NULL` as in `malloc` case it shifts the pre-allocated buffer by zero and returns the currently available memory block. This issue 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
- 6.5 / 10
- Severity
- medium
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| nothings | stb | <= 1.22 (affected) | GitHub_M · cna |
| nothings | stb | 0 through 1.22 (affected · custom)Default: unknown | CISA-ADP · adp |
Weaknesses
1- CWE-787 CWE-787: Out-of-bounds Write
References
7- https://github.com/nothings/stb/blob/5736b15f7ea0ffb08dd38af21067c314d6a3aae9/stb_vorbis.c#L3652-L3658
- https://github.com/nothings/stb/blob/5736b15f7ea0ffb08dd38af21067c314d6a3aae9/stb_vorbis.c#L3658
- https://github.com/nothings/stb/blob/5736b15f7ea0ffb08dd38af21067c314d6a3aae9/stb_vorbis.c#L950-L960
- 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
0 byte write heap buffer overflow in start_decoder in stb_vorbis
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- 747426d4028101f2074d4e9dff20fb7362ead66fd1f2cefc41a6454ecfbf9bda
- Ingested
- 23 Sep 2026, 08:12:31 UTC
- Source record
- Official CVE record