{"id":"CVE-2023-45677","aliases":["CVE-2023-45677"],"related":[],"kind":"vulnerability","state":"published","title":"Heap buffer out of bounds write in start_decoder in stb_vorbis","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","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.","source":"cvelist"},{"lang":"es","text":"stb_vorbis es una librería de archivo único con licencia MIT para procesar archivos ogg vorbis. Un archivo manipulado puede provocar una escritura fuera de límites en `f-&gt;vendor[len] = (char)'\\0';`. La causa principal es que si `len` leído en `start_decoder` es un número negativo y `setup_malloc` asigna memoria exitosamente en ese caso, pero la escritura en memoria se realiza con un índice negativo `len`. De manera similar, si len es INT_MAX, el desbordamiento de enteros len+1 ocurre en `f-&gt;vendor = (char*)setup_malloc(f, sizeof(char) * (len+1));` y `f-&gt;comment_list[i] = (char*)setup_malloc(f, tamaño de(char) * (len+1));`. Este problema puede provocar la ejecución del código.","source":"nvd"}],"published":"2023-10-20T23:26:49.582Z","modified":"2026-06-17T06:29:20.730Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L","score":7.3,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L","score":7.3,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-787"],"affected":[{"ranges":[{"version":"<= 1.22","status":"affected"}],"vendor":"nothings","product":"stb","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"0","lastAffected":"1.22","status":"affected"}],"vendor":"nothings","product":"stb","cpe":"cpe:2.3:a:nothings:stb:*:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"status":"affected","version":"1.22"}],"vendor":"nothings","product":"stb_vorbis.c","cpe":"cpe:2.3:a:nothings:stb_vorbis.c:1.22:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://securitylab.github.com/advisories/GHSL-2023-145_GHSL-2023-151_stb_image_h/","tags":["third-party-advisory","x-refsource-confirm","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://github.com/nothings/stb/blob/5736b15f7ea0ffb08dd38af21067c314d6a3aae9/stb_vorbis.c#L3652-L3658","tags":["third-party-advisory","x-refsource-misc","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://github.com/nothings/stb/blob/5736b15f7ea0ffb08dd38af21067c314d6a3aae9/stb_vorbis.c#L3653","tags":["third-party-advisory","x-refsource-misc","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://github.com/nothings/stb/blob/5736b15f7ea0ffb08dd38af21067c314d6a3aae9/stb_vorbis.c#L3658","tags":["third-party-advisory","x-refsource-misc","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://github.com/nothings/stb/blob/5736b15f7ea0ffb08dd38af21067c314d6a3aae9/stb_vorbis.c#L3670C7-L3670C75","tags":["third-party-advisory","x-refsource-misc","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://github.com/nothings/stb/blob/5736b15f7ea0ffb08dd38af21067c314d6a3aae9/stb_vorbis.c#L950-L961","tags":["third-party-advisory","x-refsource-misc","x-transferred"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2024-09-12T13:32:26.696Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2023-45677","url":"https://www.cve.org/CVERecord?id=CVE-2023-45677","licence":"CVE Terms of Use","modified":"2024-09-12T13:37:51.394Z"},{"source":"nvd","name":"NVD","id":"CVE-2023-45677","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-45677","licence":"Public domain","modified":"2026-06-17T06:29:20.730Z"}],"updatedAt":"2026-11-25T22:58:28.997Z","epss":{"score":0.00523,"percentile":0.4586,"date":"2026-12-01T12:00:22.000Z"}}