CVE-2022-31651
Medium · 5.5CVSS
5.5
EPSS
1.2%
Published
May 25, 2022
CISA due date
—
Cloudanix analysis
Audio software can unexpectedly stop working when it tries to handle certain damaged sound files, interrupting any tasks that rely on it.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Library
- Class
- Improper Input Validation
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Triggers an assertion failure in rate_init within rate.c of libsox.a when processing certain malformed audio inputs, causing abnormal termination.
Why it matters to the business
Disrupts audio conversion and editing workflows by crashing on untrusted files, leading to operational downtime in media pipelines with low urgency due to absent widespread exploitation.
How an attack unfolds
An attacker supplies a crafted audio file that fails the rate initialization check. When SoX processes the file locally, the assertion triggers and terminates the process.
How to fix it
Upgrade SoX to a version resolving the rate_init assertion; sandbox audio processing and restrict SoX to trusted inputs only.
How to confirm the fix worked
Test SoX against known triggering audio samples to confirm absence of crashes post-update; review build logs for libsox.a changes.
Typical attack path
- Craft a malicious audio file targeting rate_init assertion
- Deliver file to target environment
- Induce processing via SoX on untrusted input
- Trigger application crash and denial of service
How to detect it
Inspect SoX process logs and crash dumps for rate_init assertion messages; correlate unexpected terminations with audio file ingestion events.
- assertion failure in rate_init
- rate.c
- libsox.a
What your security team should do
- Apply latest SoX release addressing the rate handling flaw
- Enforce input sanitization and sandboxing for all audio workflows
- Monitor crash logs for rate_init failures
The record
In SoX 14.4.2, there is an assertion failure in rate_init in rate.c in libsox.a.
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:20.04:LTS | sox | 0 | 14.4.2+git20190427-2+deb11u1build0.20.04.1 |
| Ubuntu:22.04:LTS | sox | 0 | 14.4.2+git20190427-2+deb11u1build0.22.04.1 |
| Ubuntu:24.04:LTS | sox | 0 | No fix |
| Ubuntu:24.10 | sox | 0 | No fix |
| Ubuntu:25.04 | sox | 0 | No fix |
| Ubuntu:25.10 | sox | 0 | No fix |
| Ubuntu:Pro:14.04:LTS | sox | 0 | 14.4.1-3ubuntu1.1+esm2 |
| Ubuntu:Pro:16.04:LTS | sox | 0 | 14.4.1-5+deb8u4ubuntu0.1+esm1 |
| 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-2021-33844 A floating point exception (divide-by-zero) issue was discovered in SoX in functon… 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-105754 vLLM is an inference and serving engine for large language models. CWE-617