CVE-2023-45678
High · 7.8CVSS
7.8
EPSS
0.7%
Published
Oct 21, 2023
CISA due date
—
Cloudanix analysis
A flaw in a popular audio library can let attackers take control of a program simply by making it open a specially made sound file.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Full Compromise
- Component
- Library
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Out-of-bounds write in start_decoder due to m->submaps reaching 16 while submap_floor and submap_residue arrays are sized for only 15 elements, enabling memory corruption.
Why it matters to the business
Applications that decode Ogg Vorbis audio can be compromised when a malicious file is processed, potentially allowing attackers to run arbitrary code and disrupt operations or steal data.
How an attack unfolds
An attacker crafts a specially formatted Ogg Vorbis file that sets submap count to the maximum of 16. When the vulnerable library processes the file in start_decoder, the oversized index writes beyond the declared arrays, corrupting memory and allowing code execution in the context of the calling application.
How to fix it
Update the stb_vorbis implementation to ensure submap_floor and submap_residue arrays are sized to accommodate the full maximum of 16 submaps, or replace the library with a patched release once available.
How to confirm the fix worked
Recompile or scan source for array declarations matching the submaps limit, test with a crafted file that exercises maximum submap count, and confirm no writes occur beyond array bounds.
Typical attack path
- Attacker generates a malicious Ogg Vorbis file with submap count set to 16
- Victim application loads and decodes the file using the affected library
- start_decoder performs out-of-bounds write into submap arrays
- Memory corruption is leveraged for arbitrary code execution
How to detect it
Review application logs for unexpected crashes or errors during Ogg Vorbis decoding, and inspect file-processing code paths for use of the vulnerable start_decoder routine.
What your security team should do
- Identify all products and dependencies that embed stb_vorbis
- Prioritize patching or replacing the library in any media-processing components
- Apply input sanitization or sandboxing around audio decoding until fixed
- Monitor upstream stb_vorbis repository for an official fix
The record
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.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | libstb | 0 | No fix |
| Debian:12 | libstb | 0 | No fix |
| Debian:13 | libstb | 0 | No fix |
| Ubuntu:20.04:LTS | libstb | 0 | No fix |
| Ubuntu:22.04:LTS | libstb | 0 | No fix |
| Ubuntu:24.04:LTS | libstb | 0 | No fix |
| Ubuntu:24.10 | libstb | 0 | No fix |
| Ubuntu:25.04 | libstb | 0 | No fix |
| Ubuntu:25.10 | libstb | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | libstb | 0 | No fix |
Related vulnerabilities
- CVE-2023-47212 A heap-based buffer overflow vulnerability exists in the comment functionality of stb… Also affects libstb
- CVE-2023-43281 Double Free vulnerability in Nothings Stb Image.h v.2.28 allows a remote attacker to… Also affects libstb
- CVE-2023-45664 stb_image is a single file MIT licensed library for processing images. Also affects libstb
- CVE-2023-45676 stb_vorbis is a single file MIT licensed library for processing ogg vorbis files. Also affects libstb
- CVE-2023-45682 stb_vorbis is a single file MIT licensed library for processing ogg vorbis files. Also affects libstb
- CVE-2023-45679 stb_vorbis is a single file MIT licensed library for processing ogg vorbis files. Also affects libstb
- CVE-2023-45675 stb_vorbis is a single file MIT licensed library for processing ogg vorbis files. Also affects libstb
- CVE-2023-45666 stb_image is a single file MIT licensed library for processing images. Also affects libstb