CVE-2023-47212
Critical · 9.8CVSS
9.8
EPSS
1.4%
Published
May 1, 2024
CISA due date
—
Cloudanix analysis
A bug in software that plays or reads certain audio files can let attackers take control of a computer by tricking it into opening a specially made file.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Full Compromise
- Component
- Library
- Class
- Buffer Overflow
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Heap-based buffer overflow in the comment parsing functionality of stb_vorbis.c v1.22 allowing an out-of-bounds write when processing a specially crafted Ogg Vorbis file.
Why it matters to the business
Applications that decode untrusted Ogg audio files risk crashes, memory corruption, or remote code execution, potentially leading to system compromise, data exposure, or service disruption across media players, games, and embedded devices.
How an attack unfolds
An attacker crafts a malicious Ogg file with malformed comment data that triggers the heap overflow during parsing; the file is delivered to a vulnerable application which processes it, resulting in an out-of-bounds write that may be leveraged for arbitrary code execution.
How to fix it
Update the stb_vorbis library to a patched version that corrects the comment parsing buffer handling; rebuild and redeploy all dependent applications; consider sandboxing or disabling Ogg processing for untrusted content until fixed.
How to confirm the fix worked
Reproduce the issue with a known trigger file under a debugger to confirm the overflow is eliminated; perform fuzz testing on comment fields and verify absence of crashes or memory errors in updated builds.
Typical attack path
- Craft a malicious Ogg file containing oversized or malformed comment metadata targeting the vulnerable buffer in stb_vorbis
- Deliver the file to the target via network download, email attachment, or local storage
- Trigger parsing of the Ogg file through normal application usage such as playback or metadata extraction
- Exploit the resulting out-of-bounds write to corrupt heap memory and achieve code execution or denial of service
How to detect it
Review application logs and crash reports for unexpected terminations or heap errors during Ogg file processing; inspect file-handling code paths for direct calls to stb_vorbis comment functions on untrusted inputs.
What your security team should do
- Identify and inventory all products and dependencies using stb_vorbis or derived libraries
- Apply library updates immediately and test in staging environments before production rollout
- Implement input validation or file-type restrictions to block untrusted Ogg files where feasible
- Monitor vulnerability feeds for downstream patches in affected applications
The record
A heap-based buffer overflow vulnerability exists in the comment functionality of stb _vorbis.c v1.22. A specially crafted .ogg file can lead to an out-of-bounds write. An attacker can provide a malicious file to trigger this vulnerability.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | libstb | 0 | No fix |
| Debian:12 | libstb | 0 | No fix |
| Debian:13 | libstb | 0 | No fix |
| Debian:14 | libstb | 0 | No fix |
| Mageia:9 | stb | 0 | 0-0.git20230129.4.1.mga9 |
| 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-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
- CVE-2023-45667 stb_image is a single file MIT licensed library for processing images. Also affects libstb