Heap-based Buffer Overflow in libsndfile

libsndfile Updated 02 Oct 2025

Summary

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

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 across 2 version ranges.

< 1.0.28-r2 < 1d928bffdb65e827c3e7d17ece0e123b4a70ec6c

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 library for reading and writing audio files. It provides a simple and straightforward interface for handling various audio formats. However, a vulnerability has been discovered in versions up to 1.0.28 that allows remote attackers to cause a denial of service or potentially have other unspecified impacts.

Vulnerability Detail

The vulnerability, identified as CVE-2017-12562, is a heap-based buffer overflow in the psf_binheader_writef function in the common.c file of libsndfile. This vulnerability can be exploited remotely and may result in an application crash or other unknown consequences. The specific technical details of the vulnerability are available in the provided source link.

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

No workaround has been mentioned for this vulnerability.

Conclusion

The heap-based buffer overflow vulnerability in libsndfile can have severe consequences, including application crashes and potential code execution. It is crucial to update to version 1.0.28-r2 or later to mitigate this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for libsndfile →

Share this vulnerability

FAQ

libsndfile is a library for reading and writing audio files. It provides support for various audio formats and is commonly used in audio processing applications.

A heap-based buffer overflow occurs when a program writes data beyond the allocated memory buffer in the heap. This can lead to memory corruption and potentially allow an attacker to execute arbitrary code or crash the application.

The vulnerability in libsndfile can be exploited remotely by sending specially crafted audio files to a vulnerable application that uses the library. When the application attempts to process the malicious file, the buffer overflow occurs, leading to a denial of service or other potential impacts.

The potential consequences of this vulnerability include application crashes, possible execution of arbitrary code, and other unspecified impacts. The severity of the consequences may vary depending on the specific usage of libsndfile in the affected systems.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability. Vulert analyzes the manifest file, such as package-lock.json, to monitor and alert in real-time for open-source vulnerabilities without requiring access to the code or installation.

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