Buffer Overflow Vulnerability in libsndfile: CVE-2017-7585

libsndfile Updated 02 Oct 2025

Summary

07/04/2017
N/A
Yes i
Medium
5.5

ALPINE-CVE-2017-7585: In libsndfile before 1.0.28, an error in the "flac_buffer_copy()" function (flac.c) can be exploited to cause a stack-based buffer overflow via a specially crafted FLAC file. Affects libsndfile versions < 1.0.28-r0. Fixed in 1.0.28-r0. 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 Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

libsndfile is a widely used library for reading and writing audio files in various formats. It provides a simple API for developers to handle audio data efficiently. However, prior to version 1.0.28, libsndfile contained a critical vulnerability that could lead to severe security issues if exploited.

Vulnerability Detail

The vulnerability, identified as CVE-2017-7585, originates from an error in the 'flac_buffer_copy()' function within the flac.c file of libsndfile. This flaw can be exploited to cause a stack-based buffer overflow when processing specially crafted FLAC files. The ramifications of this vulnerability include potential arbitrary code execution, leading to system compromise or data corruption.

How To Fix

Minimum fixed version

1.0.28-r0

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, avoid processing untrusted FLAC files until the library is updated. Implement strict validation checks on audio files before processing them to mitigate the risk of exploitation.

Conclusion

CVE-2017-7585 represents a significant security risk for applications utilizing libsndfile prior to version 1.0.28. It is crucial to update the library to the patched version to safeguard against potential exploits. Regular monitoring for vulnerabilities using tools like Vulert can help maintain the security of your applications.

See every vulnerability recorded for libsndfile →

Share this vulnerability

FAQ

CVE-2017-7585 is a vulnerability in the libsndfile library that allows for a stack-based buffer overflow when handling specially crafted FLAC files.

You can use the Vulert platform to check if your application is affected by this vulnerability. Simply upload your manifest file like package-lock.json to monitor for vulnerabilities.

Exploitation of this vulnerability could lead to arbitrary code execution, allowing attackers to compromise the system or corrupt data.

Yes, the vulnerability has been patched in version 1.0.28-r0 of libsndfile. It is recommended to update to this version or later.

If immediate updates are not possible, avoid processing untrusted FLAC files and implement validation checks to reduce the risk of exploitation.

Related vulnerabilities

Recent vulnerabilities recorded for libsndfile.

How To Fix

Minimum fixed version

1.0.28-r0

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