CVE-2017-12562
Critical · 9.8CVSS
9.8
EPSS
4.0%
Published
Aug 5, 2017
CISA due date
—
Cloudanix analysis
A problem in audio file processing software can let attackers crash applications or potentially take them over by sending specially made files, affecting many programs that rely on the same code.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Remote Code Execution
- Component
- Library
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Medium
What it actually does
Heap-based buffer overflow in psf_binheader_writef in common.c allows out-of-bounds writes when processing malformed audio headers, enabling denial of service via crash or potential arbitrary code execution.
Why it matters to the business
Applications handling audio files may crash or be compromised, leading to service outages, data corruption, or remote code execution; high ecosystem prevalence with 98 downstream dependents amplifies widespread operational risk across dependent projects.
How an attack unfolds
An attacker crafts a malicious audio file containing an oversized or malformed header that triggers the overflow in psf_binheader_writef during parsing; the file is delivered to a vulnerable application (such as those in the TensorFlow ecosystem) which processes it, resulting in memory corruption that can be leveraged for crashes or code execution.
How to fix it
Upgrade to fixed versions immediately; for tensorflow (Bitnami) update to 2.1.4 or later, and ensure any libsndfile dependency is upgraded beyond 1.0.28. Rebuild and redeploy affected packages after patching.
How to confirm the fix worked
Verify installed package versions against fixed releases (e.g., tensorflow (Bitnami) >= 2.1.4), run regression tests with malformed audio inputs, and confirm absence of the vulnerable function signature in binaries.
Typical attack path
- Identify or create a target audio file format processed by libsndfile
- Craft malformed header data to overflow the heap buffer in psf_binheader_writef
- Deliver the file via network upload, email attachment, or local processing
- Trigger file parsing in the vulnerable application
- Exploit resulting memory corruption for denial of service or code execution
How to detect it
Search application logs and crash reports for segmentation faults or heap corruption during audio file processing; inspect stack traces referencing common.c or psf_binheader_writef; review file upload and processing events for unexpected failures.
What your security team should do
- Prioritize patching tensorflow (Bitnami) to 2.1.4 due to high CVSS and ecosystem reach
- Inventory all dependents and update libsndfile across the environment
- Enable strict input validation and sandboxing for audio processing workflows
- Monitor EPSS and exploit maturity for any future changes despite current low activity
The record
Heap-based Buffer Overflow in the psf_binheader_writef function in common.c in libsndfile through 1.0.28 allows remote attackers to cause a denial of service (application crash) or possibly have unspecified other impact.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Alpine:v3.10 | libsndfile | 0 | 1.0.28-r2 |
| Alpine:v3.11 | libsndfile | 0 | 1.0.28-r2 |
| Alpine:v3.12 | libsndfile | 0 | 1.0.28-r2 |
| Alpine:v3.13 | libsndfile | 0 | 1.0.28-r2 |
| Alpine:v3.14 | libsndfile | 0 | 1.0.28-r2 |
| Alpine:v3.15 | libsndfile | 0 | 1.0.28-r2 |
| Alpine:v3.16 | libsndfile | 0 | 1.0.28-r2 |
| Alpine:v3.17 | libsndfile | 0 | 1.0.28-r2 |
| Alpine:v3.18 | libsndfile | 0 | 1.0.28-r2 |
| Alpine:v3.19 | libsndfile | 0 | 1.0.28-r2 |
| Alpine:v3.20 | libsndfile | 0 | 1.0.28-r2 |
| Alpine:v3.21 | libsndfile | 0 | 1.0.28-r2 |
| Alpine:v3.22 | libsndfile | 0 | 1.0.28-r2 |
| Alpine:v3.3 | libsndfile | 0 | 1.0.28-r2 |
| Alpine:v3.4 | libsndfile | 0 | 1.0.28-r2 |
| Alpine:v3.5 | libsndfile | 0 | 1.0.28-r2 |
| Alpine:v3.6 | libsndfile | 0 | 1.0.28-r2 |
| Alpine:v3.7 | libsndfile | 0 | 1.0.28-r2 |
| Alpine:v3.8 | libsndfile | 0 | 1.0.28-r2 |
| Alpine:v3.9 | libsndfile | 0 | 1.0.28-r2 |
| Debian:11 | libsndfile | 0 | 1.0.28-3 |
| Debian:12 | libsndfile | 0 | 1.0.28-3 |
| Debian:13 | libsndfile | 0 | 1.0.28-3 |
| Debian:14 | libsndfile | 0 | 1.0.28-3 |
| Debian:7 | libsndfile | 0 | 1.0.25-9.1+deb7u4 |
| Debian:9 | libsndfile | 0 | 1.0.27-3+deb9u3 |
| Mageia:5 | libsndfile | 0 | 1.0.25-9.4.mga5 |
| Mageia:6 | libsndfile | 0 | 1.0.28-3.1.mga6 |
| Ubuntu:16.04:LTS | libsndfile | 0 | 1.0.25-10ubuntu0.16.04.3 |
| Ubuntu:Pro:14.04:LTS | libsndfile | 0 | 1.0.25-7ubuntu2.2+esm1 |
| openSUSE:Tumbleweed | libsndfile | 0 | 1.0.31-2.2 |
Related vulnerabilities
- CVE-2017-7585 In libsndfile before 1.0.28, an error in the "flac_buffer_copy()" function (flac.c) can… Also affects libsndfile
- CVE-2024-50612 libsndfile through 1.2.2 has an ogg_vorbis.c vorbis_analysis_wrote out-of-bounds read. Also affects libsndfile
- CVE-2024-50613 libsndfile through 1.2.2 has a reachable assertion, that may lead to application exit, in… Also affects libsndfile
- CVE-2022-33065 Multiple signed integers overflow in function au_read_header in src/au.c and in functions… Also affects libsndfile
- CVE-2021-4156 An out-of-bounds read flaw was found in libsndfile's FLAC codec functionality. Also affects libsndfile
- CVE-2017-14245 An out of bounds read in the function d2alaw_array() in alaw.c of libsndfile 1.0.28 may… Also affects libsndfile
- CVE-2015-7805 Heap-based buffer overflow in libsndfile 1.0.25 allows remote attackers to have… Also affects libsndfile
- CVE-2014-9496 The sd2_parse_rsrc_fork function in sd2.c in libsndfile allows attackers to have… Also affects libsndfile