Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-111157 Overview
CVE-2026-111157 is a heap out-of-bounds write vulnerability [CWE-787] affecting SoX (Sound eXchange) through version 14.4.2. The flaw resides in lsx_ms_adpcm_block_expand_i() within src/adpcm.c and is triggered when a WAV file's fmt chunk declares an odd samplesPerBlock value. Attackers can craft a malicious MS ADPCM WAV file that causes sox or any application linking against libsox to write a partially controlled 16-bit sample past the end of the heap buffer allocated by wav_ms_adpcm_fmt(). The condition requires user interaction to open or process the crafted file.
Critical Impact
A crafted MS ADPCM WAV file causes a heap out-of-bounds write in any process using sox or libsox, enabling memory corruption and potential denial of service.
Affected Products
- SoX (Sound eXchange) command-line utility through version 14.4.2
- libsox library through version 14.4.2
- Any downstream application or audio processing pipeline linking libsox for WAV decoding
Discovery Timeline
- 2026-10-15 - CVE-2026-111157 published to NVD
- 2026-10-16 - Last updated in NVD database
Technical Details for CVE-2026-111157
Vulnerability Analysis
SoX parses the WAV fmt chunk through wav_ms_adpcm_fmt() in src/wav.c, which allocates a heap buffer sized according to the samplesPerBlock field declared in the file header. During decoding, lsx_ms_adpcm_block_expand_i() in src/adpcm.c iterates over the ADPCM nibbles and writes decoded 16-bit PCM samples into that buffer. The decode loop assumes samplesPerBlock conforms to the expected alignment used during allocation. When an attacker supplies an odd value, the loop writes one 16-bit sample beyond the allocated region, producing a heap out-of-bounds write classified as [CWE-787]. The written value is derived from attacker-controlled ADPCM sample data, giving partial control over the overflowed bytes.
Root Cause
The root cause is a mismatch between the buffer allocation in wav_ms_adpcm_fmt() and the decoding loop bounds in lsx_ms_adpcm_block_expand_i(). The allocation path does not validate that samplesPerBlock is even, while the decoder assumes even alignment when calculating write positions. See the GitHub SoX WAV Code Snippet and the GitHub SoX ADPCM Code Snippet for the relevant code paths.
Attack Vector
Exploitation is local and requires the victim to open or process a crafted MS ADPCM WAV file with sox, a wrapper tool, or any application linking libsox. Delivery channels include email attachments, downloaded audio samples, media server ingest paths, and automated transcoding workflows. Successful exploitation corrupts heap metadata or adjacent allocations, which can lead to process crash or further memory corruption primitives depending on allocator state.
No verified public exploit code is available. For technical analysis of the overflow condition, refer to the HackMD SoX OOB Write Analysis and the VulnCheck SoX Heap OOB Advisory.
Detection Methods for CVE-2026-111157
Indicators of Compromise
- WAV files whose fmt chunk declares wFormatTag = 0x0002 (MS ADPCM) with an odd nSamplesPerBlock value
- Process crashes or heap corruption reports originating from sox or any binary loading libsox
- Unexpected invocations of sox or audio transcoding tools against files received from untrusted sources
Detection Strategies
- Pre-process WAV files with a validator that rejects MS ADPCM headers containing odd samplesPerBlock values before invoking SoX
- Run sox and libsox consumers under AddressSanitizer or hardened allocators in test environments to surface the out-of-bounds write deterministically
- Correlate crash telemetry from endpoint telemetry sources against processes with libsox loaded in their address space
Monitoring Recommendations
- Alert on segmentation faults or heap corruption aborts for sox, media servers, and transcoding daemons
- Log command-line invocations of sox across servers and workstations and review arguments pointing to externally sourced files
- Monitor file ingest pipelines for WAV uploads and surface anomalies in format metadata
How to Mitigate CVE-2026-111157
Immediate Actions Required
- Inventory all systems running sox or applications linking libsox, including audio transcoding workflows and media servers
- Restrict sox and libsox consumers from processing WAV files sourced from untrusted users until a fix is deployed
- Apply distribution-provided patches or backports as soon as they are published by the relevant Linux vendor
Patch Information
No upstream patch has been released for SoX 14.4.2 at the time of publication. The upstream project on SourceForge SoX Project Page has not shipped a new release addressing this issue. Track distribution security trackers (Debian, Red Hat, SUSE, Ubuntu) for backported fixes, and consult the VulnCheck SoX Heap OOB Advisory for updates.
Workarounds
- Validate the nSamplesPerBlock field in the WAV fmt chunk and reject files where the value is odd before passing them to SoX
- Sandbox sox and libsox consumers using seccomp, AppArmor, or SELinux profiles that restrict file and network access
- Disable MS ADPCM decoding paths in downstream applications where this format is not required
- Replace sox-based transcoding with an alternative decoder for untrusted WAV input until a patched build is available
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

