Stb Vorbis.cApplication · Nothings

CVE-2023-45678

HIGH · 7.8 CVSS v3.1 Published 2023-10-21
Mitigation only
No fix yet — a mitigation exists. There is no fixed release. A documented workaround reduces exposure in the meantime.
See remediation →
81/100
Remediation priority · High
No privileges

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 · unedited
stb_vorbis is a single file MIT licensed library for processing ogg vorbis files. A crafted file may trigger out of buffer write in `start_decoder` because at maximum `m->submaps` can be 16 but `submap_floor` and `submap_residue` are declared as arrays of 15 elements. 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 confidence

stb_vorbis contains a heap-based buffer overflow where `submap_floor` and `submap_residue` arrays are declared with 15 elements, but `m->submaps` can be 16. Processing a crafted Ogg Vorbis file triggers out-of-bounds writes beyond the array bounds, potentially enabling code execution.

MitigationUpdate stb_vorbis to a version that declares `submap_floor` and `submap_residue` arrays with 16 elements, or validate and sanitize Ogg Vorbis files from untrusted sources before processing.

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
Stb Vorbis.cApplication
Affected:= 1.22

CVSS 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 checks

Work through these to decide whether this CVE applies to you.

  1. Locate stb_vorbis source file
    Search for stb_vorbis.c or stb_vorbis.h in your codebase or dependencies. Check the version comment at the top of the file or look for a version definition.
    Affected if The file version is 1.22 or if the arrays submap_floor and submap_residue are declared with 15 elements (size 15)
  2. Verify array declaration size
    Inspect the source code for declarations of submap_floor and submap_residue arrays. Look for lines that declare these arrays.
    Affected if Both arrays are declared with a size of 15 elements, indicating vulnerability. The vulnerable pattern is: submap_floor[15] and submap_residue[15].
  3. Check submap processing logic
    Look for code that reads the number of submaps from the Ogg Vorbis file header (m->submaps) and iterates using this value as an array index.
    Affected if The code uses m->submaps as an index into submap_floor or submap_residue arrays without bounds checking for values up to 16.
  4. Identify Ogg Vorbis file processing
    Search for code paths that decode or parse Ogg Vorbis files using stb_vorbis (e.g., stb_vorbis_open_filename, stb_vorbis_open_memory, stb_vorbis_decode_filename).
    Affected if The application processes Ogg Vorbis files from untrusted or external sources, which could trigger the overflow with a crafted file containing 16 submaps.

Your environment is affected if stb_vorbis.c version 1.22 is in use, the source declares submap_floor and submap_residue with 15 elements, and your application processes Ogg Vorbis files from untrusted sources.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

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 · scoped
Mitigation available No clean upgrade yet — mitigate in the meantime
Mitigation

Update stb_vorbis to a version that declares `submap_floor` and `submap_residue` arrays with 16 elements, or validate and sanitize Ogg Vorbis files from untrusted sources before processing.

Recommended fix High confidence

Check the stb_vorbis GitHub repository (github.com/nothings/stb) for a version newer than 1.22 that addresses this bounds issue, or apply the manual array-size fix

  1. 1. Locate the stb_vorbis.c file in your project (typically included as a single-header library)
  2. 2. Identify the arrays `submap_floor` and `submap_residue` in the stb_vorbis struct definition
  3. 3. Increase the array size from 15 to 16 elements to match the maximum possible value of `m->submaps`
  4. 4. Alternatively, replace the fixed-size arrays with dynamic allocation that scales with `m->submaps`
  5. 5. Rebuild and test with the crafted proof-of-concept file to verify the fix
  6. 6. Ensure any other code that accesses these arrays is updated to handle the new size
Caveat Minimal - this is an internal array size correction; ensure any custom code accessing these arrays accounts for index 15

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Stb Vorbis.c Scoped from the published advisory
  • Consultation2.0 h
  • Implementation1.0 h
  • Testing3.0 h
  • Review / QA2.0 h
8.0 hours of engineering $1,390
Get help mitigating

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $2,224.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2023-45678 — 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 sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2023-45678 in production — separate from our analysis above.

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.

What this is

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.

What belongs here
  • 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