CVE-2023-45677
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedstb_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.
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · high confidencestb_vorbis library contains an out-of-bounds write vulnerability in the `start_decoder` function where a negative `len` value from a crafted Ogg Vorbis file is used as an array index when writing the null terminator to `f->vendor[len]`. Additionally, when `len` is INT_MAX, an integer overflow occurs in the malloc size calculation `(len+1)`, leading to undersized allocations and subsequent out-of-bounds writes. This can enable code execution.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.
NVD · CPE data= 1.22CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Local
- Complexity
- Low
- Privileges
- None
- User interaction
- Required
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Locate stb_vorbis.c in your codebaseSearch for files named 'stb_vorbis.c' or 'stb_vorbis.h' in your project directories. Check source code repositories or bundled third-party libraries.Affected if The file exists and its version is 1.22 (look for version comments like '#define STB_VORBIS_VERSION 1.22' or similar version identifiers)
-
Identify if your application processes Ogg Vorbis audio filesSearch your codebase for calls to stb_vorbis functions such as stb_vorbis_open_filename, stb_vorbis_open_memory, stb_vorbis_decode_filename, or stb_vorbis_decode_frame. Look for file input handling of .ogg or .vorbis extensions.Affected if Your application loads Ogg Vorbis files using stb_vorbis functions
-
Check if untrusted Ogg Vorbis files can be processedReview your application's data flow to determine if Ogg Vorbis files come from untrusted sources such as user uploads, network requests, or external APIs. Inspect the file opening code paths.Affected if Ogg Vorbis files from untrusted sources are processed without prior validation
-
Verify the vulnerable start_decoder code pattern existsOpen stb_vorbis.c and locate the start_decoder function. Search for 'vendor' variable usage and array indexing patterns like 'f->vendor[len]' where len is read from file input without proper bounds validation.Affected if The code reads a length value from the Ogg Vorbis file and uses it directly as an array index without validating it is non-negative and less than INT_MAX
Your environment is affected if you use stb_vorbis.c version 1.22 and process Ogg Vorbis files from untrusted sources without validating the vendor string length field.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
dbcve · scopedValidate that `len` values read from Ogg Vorbis files are non-negative and will not cause integer overflow when calculating `len+1` for memory allocation. Ensure all index calculations use proper bounds checking before memory access.
stb_vorbis v1.23 or later
- 1. Locate the stb_vorbis.c file in your project codebase
- 2. Check the current version identifier at the top of the file (typically in a comment near the license header)
- 3. Identify if the version is 1.22 or earlier by looking for the version string (e.g., "stb_vorbis v1.22" or similar)
- 4. Download the latest version of stb_vorbis.c from the official repository at https://github.com/nothings/stb
- 5. Replace the existing stb_vorbis.c with the newer version
- 6. Recompile your project to incorporate the fixed library
- 7. Test that audio decoding functionality still works correctly with your application
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation4.0 h
- Implementation6.0 h
- Testing6.0 h
- Review / QA3.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $5,312.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2023-45677 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2023-45677 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data