SecurityContext

CVE-2023-45677: stb_vorbis - Buffer Overflow

  • Cve: CVE-2023-45677
  • Name: stb_vorbis - Buffer Overflow
  • 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.
  • Impact: Attackers can cause buffer overflows leading to arbitrary code execution or crashes.
  • Remediation: Apply the latest patches or updates from the library maintainers, or consider using a safer implementation.
  • Vulnerability type: buffer_overflow
  • Vulnerability impact: remote_code_execution, denial_of_service
  • Requirement type: user_interaction
  • Requirements: Attacker needs to provide a crafted ogg vorbis file
  • Labels source: projectdiscovery
  • Severity: high
  • Cvss score: 7.8
  • Cvss vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
  • Epss score: 0.00523
  • Epss percentile: 0.45258
  • Assignee: [email protected]
  • Published at: 2023-10-21T00:15:09Z
  • Age in days: 1130
  • Modified at: 2026-06-17T06:29:20Z
  • References total: 6
  • Products total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2023-45677
  • Nvd status: modified
  • Checked, none or zero: patch available, known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, oss, projects total, projects, rejected by nvd
  • Not known: hackerone

Cwe

IdName
CWE-787Out-of-bounds Write

References

Same in every row:

  • Source: nvd
  • Tags: Third Party Advisory
Url
https://github.com/nothings/stb/blob/5736b15f7ea0ffb08dd38af21067c314d6a3aae9/stb_vorbis.c#L3652-L3658
https://github.com/nothings/stb/blob/5736b15f7ea0ffb08dd38af21067c314d6a3aae9/stb_vorbis.c#L3653
https://github.com/nothings/stb/blob/5736b15f7ea0ffb08dd38af21067c314d6a3aae9/stb_vorbis.c#L3658
https://github.com/nothings/stb/blob/5736b15f7ea0ffb08dd38af21067c314d6a3aae9/stb_vorbis.c#L3670C7-L3670C75
https://github.com/nothings/stb/blob/5736b15f7ea0ffb08dd38af21067c314d6a3aae9/stb_vorbis.c#L950-L961
https://securitylab.github.com/advisories/GHSL-2023-145_GHSL-2023-151_stb_image_h/

Products

ProductAffectedPlatform boundSourcesUrl
nothings:stb_vorbis.c= 1.22nonvd/v1/products/nothings/stb_vorbis.c

Index

  • Checked, none or zero: repositories, repositories high signal, packages

Exploitation

  • Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, remote, authentication required
  • Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports, exposed hosts