Cloudanix VulnDB

CVE-2023-45681

High · 7.8

CVSS

7.8

EPSS

0.5%

Published

Oct 21, 2023

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A bug in a widely used music-file library can let attackers take over a computer simply by getting it to open a specially made audio file.

Exploitation
Requires User Interaction
Attacker needs
User Interaction
Complexity
Low
Impact
Full Compromise
Component
Library
Class
Buffer Overflow
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

The flaw permits a crafted Ogg Vorbis file to trigger an integer overflow when computing the allocation size for the comment list in start_decoder (sizeof(char*) * comment_list_length), causing setup_malloc to reserve insufficient heap memory or return null and enabling an out-of-bounds write that can be leveraged for code execution.

Why it matters to the business

Applications that embed the stb_vorbis library and process untrusted audio files face the risk of remote or local code execution, which can result in full system compromise, data theft, or deployment of malware across any dependent media-handling software.

How an attack unfolds

An attacker creates a malicious Ogg Vorbis file with an oversized comment_list_length value that overflows the allocation calculation. When the target application calls start_decoder on this file, the undersized or null buffer is written past, allowing the attacker to corrupt heap metadata and redirect execution to attacker-controlled code.

How to fix it

Replace the vulnerable stb_vorbis.c implementation with a patched version that eliminates the integer overflow in comment-list allocation; if a patched release is unavailable, isolate or sandbox all Vorbis decoding, disable untrusted file processing, or switch to a different library.

How to confirm the fix worked

Recompile or re-link the application against the updated stb_vorbis source, then replay known trigger files while monitoring allocation sizes and confirming that comment-list memory requests are correctly bounded and that no heap writes occur outside the allocated region.

Typical attack path

  1. Craft Ogg Vorbis file containing comment_list_length value that overflows integer multiplication
  2. Deliver file via download, email attachment, or media import to the vulnerable application
  3. Trigger file processing that reaches start_decoder
  4. Force setup_malloc to allocate insufficient memory or return null
  5. Perform subsequent write that overflows the heap buffer and achieves code execution

How to detect it

Search application and system logs for crashes or segmentation faults that occur while decoding Ogg Vorbis files; inspect heap-allocation traces or memory-error reports for anomalous sizes near comment-list handling; look for child processes or unexpected code execution immediately after Vorbis file access.

What your security team should do

  • Inventory all products and dependencies that statically or dynamically link stb_vorbis and prioritize patching or replacement
  • Apply vendor updates as soon as a fixed stb_vorbis release becomes available
  • Implement strict input validation or sandboxing around any audio-file processing until the library is updated
  • Block or filter untrusted Ogg Vorbis files at email gateways, download portals, and media import paths

The record

stb_vorbis is a single file MIT licensed library for processing ogg vorbis files. A crafted file may trigger memory write past an allocated heap buffer in `start_decoder`. The root cause is a potential integer overflow in `sizeof(char*) * (f->comment_list_length)` which may make `setup_malloc` allocate less memory than required. Since there is another integer overflow an attacker may overflow it too to force `setup_malloc` to return 0 and make the exploit more reliable. 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
Mageia:9 stb 0 0-0.git20230129.4.1.mga9
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
openSUSE:Tumbleweed SDL2_sound 0 2.0.4-1.1
openSUSE:Tumbleweed SDL3_sound 0 3.2.0-1.1

Related vulnerabilities