{"id":"CVE-2023-45677","published":"2023-10-20T23:26:49Z","modified":"2024-09-12T13:37:51Z","title":"Heap buffer out of bounds write in start_decoder in stb_vorbis","vendor":"nothings","product":"stb","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.3,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00523,"percentile":0.45293,"provenance":"source"},"cwes":[{"id":"CWE-787","name":"Out-of-bounds Write"}],"references":[{"url":"https://securitylab.github.com/advisories/GHSL-2023-145_GHSL-2023-151_stb_image_h/","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/nothings/stb/blob/5736b15f7ea0ffb08dd38af21067c314d6a3aae9/stb_vorbis.c#L3652-L3658","tags":["x_refsource_MISC"]},{"url":"https://github.com/nothings/stb/blob/5736b15f7ea0ffb08dd38af21067c314d6a3aae9/stb_vorbis.c#L3653","tags":["x_refsource_MISC"]},{"url":"https://github.com/nothings/stb/blob/5736b15f7ea0ffb08dd38af21067c314d6a3aae9/stb_vorbis.c#L3658","tags":["x_refsource_MISC"]},{"url":"https://github.com/nothings/stb/blob/5736b15f7ea0ffb08dd38af21067c314d6a3aae9/stb_vorbis.c#L3670C7-L3670C75","tags":["x_refsource_MISC"]},{"url":"https://github.com/nothings/stb/blob/5736b15f7ea0ffb08dd38af21067c314d6a3aae9/stb_vorbis.c#L950-L961","tags":["x_refsource_MISC"]}],"priority":{"score":14.2,"factors":[{"name":"EPSS percentile","points":9.06},{"name":"CVSS severity","points":5.11}]},"vendorSlug":"nothings","affectedVersions":[{"vendor":"nothings","product":"stb","versions":["<= 1.22"]}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"partial","timestamp":"2024-09-12T13:32:26.696444Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2023-49967","exploited":false,"provenance":"source"}}