CVE-2021-33844
Medium · 5.5CVSS
5.5
EPSS
0.5%
Published
Aug 25, 2022
CISA due date
—
Cloudanix analysis
A specially crafted sound file can make an audio processing program crash when a user tries to open or convert it.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Application
- Class
- Improper Input Validation
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
A divide-by-zero floating point exception in startread() of wav.c triggers an application crash when processing a specially crafted WAV file.
Why it matters to the business
Local users or automated media-processing workflows can be disrupted by denial-of-service crashes when handling untrusted audio files; the absence of listed fixes increases exposure for organizations still running older SoX versions.
How an attack unfolds
An attacker prepares a malformed WAV file that triggers the divide-by-zero in the WAV reader, then causes the victim to invoke SoX on that file locally, resulting in an immediate crash with no further code execution.
How to fix it
Upgrade SoX to a version that eliminates the divide-by-zero condition in wav.c; until a fixed release is available, avoid processing untrusted WAV files with SoX and consider alternative audio tools for untrusted input.
How to confirm the fix worked
Test that SoX no longer crashes when invoked against a WAV file containing the previously problematic header values; monitor process exit status and logs for floating-point exceptions during WAV handling.
Typical attack path
- Craft a WAV file containing values that cause division by zero in startread().
- Deliver the file to the target via email, download, or shared storage.
- Trick or automate the target into running SoX against the file (e.g., sox malicious.wav).
- Observe application termination due to the unhandled floating-point exception.
How to detect it
Review application and system logs for SoX processes that terminate abnormally when handling WAV files; correlate file-access events with subsequent crashes or floating-point exception signals.
What your security team should do
- Block or sandbox SoX execution against files from untrusted sources until patched.
- Inventory all systems using the sox package and schedule upgrades as soon as fixed builds are released.
- Add SoX crash signatures to endpoint monitoring to detect attempted exploitation.
The record
A floating point exception (divide-by-zero) issue was discovered in SoX in functon startread() of wav.c file. An attacker with a crafted wav file, could cause an application to crash.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:10 | sox | 0 | 14.4.2+git20190427-1+deb10u1 |
| Debian:11 | sox | 0 | 14.4.2+git20190427-2+deb11u1 |
| Debian:12 | sox | 0 | 14.4.2+git20190427-3.1 |
| Debian:13 | sox | 0 | 14.4.2+git20190427-3.1 |
| Mageia:8 | sox | 0 | 14.4.3-0.git20200117.3.1.mga8 |
| SUSE:Package Hub 15 SP4 | sox | 0 | 14.4.2-bp154.2.3.1 |
| SUSE:Package Hub 15 SP5 | sox | 0 | 14.4.2-bp155.3.3.1 |
| Ubuntu:18.04:LTS | sox | 0 | 14.4.2-3ubuntu0.18.04.2 |
| Ubuntu:18.04:LTS | sox | 0 | 14.4.2-3ubuntu0.18.04.3 |
| Ubuntu:20.04:LTS | sox | 0 | 14.4.2+git20190427-2+deb11u1build0.20.04.1 |
| Ubuntu:20.04:LTS | sox | 0 | 14.4.2+git20190427-2+deb11u2build0.20.04.1 |
| Ubuntu:22.04:LTS | sox | 0 | 14.4.2+git20190427-2+deb11u1build0.22.04.1 |
| Ubuntu:22.04:LTS | sox | 0 | 14.4.2+git20190427-2+deb11u2build0.22.04.1 |
| Ubuntu:24.04:LTS | sox | 0 | No fix |
| Ubuntu:24.10 | sox | 0 | No fix |
| Ubuntu:Pro:14.04:LTS | sox | 0 | 14.4.1-3ubuntu1.1+esm2 |
| Ubuntu:Pro:14.04:LTS | sox | 0 | 14.4.1-3ubuntu1.1+esm3 |
| Ubuntu:Pro:16.04:LTS | sox | 0 | 14.4.1-5+deb8u4ubuntu0.1+esm1 |
| Ubuntu:Pro:16.04:LTS | sox | 0 | 14.4.1-5+deb8u4ubuntu0.1+esm2 |
| openSUSE:Leap 15.4 | sox | 0 | 14.4.2-bp154.2.3.1 |
| openSUSE:Leap 15.5 | sox | 0 | 14.4.2-bp155.3.3.1 |
| openSUSE:Tumbleweed | sox | 0 | 14.4.2-8.1 |
Related vulnerabilities
- CVE-2023-32627 A floating point exception vulnerability was found in sox, in the read_samples function… Also affects sox
- CVE-2022-31651 In SoX 14.4.2, there is an assertion failure in rate_init in rate.c in libsox.a. Also affects sox
- CVE-2022-31650 In SoX 14.4.2, there is a floating-point exception in lsx_aiffstartwrite in aiff.c in… Also affects sox
- CVE-2021-40426 A heap-based buffer overflow vulnerability exists in the sphere.c start_read()… Also affects sox
- CVE-2023-26590 A floating point exception vulnerability was found in sox, in the lsx_aiffstartwrite… Also affects sox
- CVE-2019-8354 An issue was discovered in SoX 14.4.2. Also affects sox
- CVE-2004-0557 Multiple buffer overflows in the st_wavstartread function in wav.c for Sound eXchange… Also affects sox
- CVE-2026-112054 Schroedinger libschroedinger through 1.0.11 contains a divide by zero vulnerability that… CWE-369