CVE-2023-45679
High · 7.8CVSS
7.8
EPSS
0.5%
Published
Oct 21, 2023
CISA due date
—
Cloudanix analysis
A flaw in a popular audio library can let attackers take over a computer simply by tricking it into opening 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
Memory allocation failure in start_decoder leaves uninitialized pointers in f->comment_list; subsequent calls to setup_free in vorbis_deinit operate on these pointers, resulting in memory corruption that can be leveraged for arbitrary code execution.
Why it matters to the business
Applications embedding the stb_vorbis library become susceptible to remote code execution when processing attacker-supplied OGG Vorbis files, potentially allowing full compromise of user systems or servers that handle untrusted audio content.
How an attack unfolds
An attacker crafts a specially malformed OGG Vorbis file that forces a memory allocation failure inside start_decoder. When the library later calls vorbis_deinit, the uninitialized pointers are passed to setup_free, corrupting memory and enabling the attacker to hijack control flow and execute arbitrary code.
How to fix it
Replace the affected stb_vorbis.c implementation with a patched version once available from the upstream project; until then, disable processing of untrusted OGG Vorbis files or sandbox applications that use the library.
How to confirm the fix worked
Rebuild and test with known-good Vorbis files after applying any patch; monitor library behavior on allocation-failure paths to confirm pointers are properly cleared before deinitialization.
Typical attack path
- Craft a malicious OGG Vorbis file that triggers allocation failure in start_decoder
- Deliver the file to the target via email, download, or media playback
- Victim application loads the file using the vulnerable stb_vorbis decoder
- Memory corruption occurs during vorbis_deinit, leading to code execution
How to detect it
Review application logs and crash reports for abnormal termination or memory errors while decoding OGG Vorbis files; correlate with file hashes or sources of recently received audio content.
What your security team should do
- Inventory all products and dependencies that statically or dynamically link stb_vorbis
- Prioritize removal or isolation of the library from attack surfaces that accept untrusted audio
- Implement file-type sandboxing or content-disarm-and-reconstruction for OGG files until a fix is deployed
The record
stb_vorbis is a single file MIT licensed library for processing ogg vorbis files. A crafted file may trigger memory allocation failure in `start_decoder`. In that case the function returns early, but some of the pointers in `f->comment_list` are left initialized and later `setup_free` is called on these pointers in `vorbis_deinit`. 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 |
| SUSE:Package Hub 15 SP6 | SDL2_sound | 0 | 2.0.4-bp156.2.3.1 |
| 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 |
| openSUSE:Leap 15.6 | SDL2_sound | 0 | 2.0.4-bp156.2.3.1 |
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-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
- CVE-2023-45667 stb_image is a single file MIT licensed library for processing images. Also affects libstb