High severity · published Oct 21, 2023
CVE-2023-45677
stb_vorbis is a single file MIT licensed library for processing ogg vorbis files
7.8
CVSS
0.5%
EPSS
No
On KEV
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 `len` read in `start_decoder` is a negative number and `setup_malloc` successfully allocates memory in that case, but memory write is done with a negative index `len`. Similarly if len is INT_MAX the integer overflow len+1 happens in `f->vendor = (char*)setup_malloc(f, sizeof(char) * (len+1));` and `f->comment_list[i] = (char*)setup_malloc(f, sizeof(char) * (len+1));`. This issue may lead to code execution.
CVSS vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Attack vector
Local
Complexity
Low
Privileges
None
User interaction
Required
Confidentiality
High
Integrity
High
Availability
High
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)0.5% · higher than 44% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
SV
Stb Vorbis.c · Nothings
1.22 · source: NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2023-45677
CVE.org
https://www.cve.org/CVERecord?id=CVE-2023-45677
Third Party Advisory
https://github.com/nothings/stb/blob/5736b15f7ea0ffb08dd38af21067c314d6a3aae9/stb_vorbis.c#L3652-L3658
Third Party Advisory
https://github.com/nothings/stb/blob/5736b15f7ea0ffb08dd38af21067c314d6a3aae9/stb_vorbis.c#L3653
Third Party Advisory
https://github.com/nothings/stb/blob/5736b15f7ea0ffb08dd38af21067c314d6a3aae9/stb_vorbis.c#L3658
Third Party Advisory
https://github.com/nothings/stb/blob/5736b15f7ea0ffb08dd38af21067c314d6a3aae9/stb_vorbis.c#L3670C7-L3670C75
Third Party Advisory
https://github.com/nothings/stb/blob/5736b15f7ea0ffb08dd38af21067c314d6a3aae9/stb_vorbis.c#L950-L961
Third Party Advisory
https://securitylab.github.com/advisories/GHSL-2023-145_GHSL-2023-151_stb_image_h/
More from Stb Vorbis.c
9.8
CVE-2023-47212
A heap-based buffer overflow vulnerability exists in the comment functionality of stb _vorbis.c v1.22
8.8
CVE-2026-5317
Nothings stb stb_vorbis.c start_decoder out-of-bounds write
7.8
CVE-2023-45681
stb_vorbis is a single file MIT licensed library for processing ogg vorbis files
7.8
CVE-2023-45679
stb_vorbis is a single file MIT licensed library for processing ogg vorbis files
7.8
CVE-2023-45678
stb_vorbis is a single file MIT licensed library for processing ogg vorbis files
