Heap-based Buffer Overflow in libsndfile: Critical Vulnerability Leading to Denial of Service

libsndfile Updated 02 Oct 2025

Summary

05/08/2017
N/A
Yes i
Critical
9.8

ALPINE-CVE-2017-12562: 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. Affects libsndfile versions < 1.0.28-r2. Fixed in 1.0.28-r2. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

libsndfile is a widely used library for reading and writing files containing sampled sound. It supports various audio formats and is essential for applications that require audio processing capabilities. This library is integral to many software projects, making its security paramount. The vulnerability in question affects versions of libsndfile up to 1.0.28, exposing users to potential crashes and other impacts due to improper handling of audio file headers.

Vulnerability Detail

The vulnerability, identified as CVE-2017-12562, is a heap-based buffer overflow in the psf_binheader_writef function located in common.c of libsndfile. This flaw allows remote attackers to exploit the library by crafting malicious audio files, leading to application crashes or potentially other unspecified impacts. The severity of this vulnerability is underscored by its CVSS score of 9.8, indicating a critical risk level.

How To Fix

Minimum fixed version

1.0.28-r2

This is the first release that contains the fix.

sudo apk add --upgrade libsndfile

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, users can avoid processing untrusted audio files until the library is updated. Additionally, implementing input validation to check the integrity of audio files before processing may mitigate some risks.

Conclusion

The heap-based buffer overflow vulnerability in libsndfile poses a significant risk to applications that utilize this library for audio processing. Users are strongly advised to update to the patched version to safeguard against potential exploits. Utilizing tools like Vulert can help monitor and alert for such vulnerabilities in real-time.

See every vulnerability recorded for libsndfile →

Share this vulnerability

FAQ

CVE-2017-12562 is a critical vulnerability in the libsndfile library that allows attackers to exploit a buffer overflow, potentially leading to application crashes.

You can use the Vulert platform to check for vulnerabilities in your application without any installation. Simply upload your manifest file like package-lock.json to get real-time alerts.

The primary consequence is a denial of service, where the application may crash when processing malicious audio files. There may also be other unspecified impacts.

Yes, the patch is available in version 1.0.28-r2 of libsndfile. Users should update to this version to mitigate the vulnerability.

If an immediate update is not possible, avoid processing untrusted audio files and consider implementing input validation as a temporary measure.

Related vulnerabilities

Recent vulnerabilities recorded for libsndfile.

How To Fix

Minimum fixed version

1.0.28-r2

This is the first release that contains the fix.

sudo apk add --upgrade libsndfile

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback