Segmentation Violation in libsndfile Due to FLAC File Processing

libsndfile Updated 02 Oct 2025

Summary

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

ALPINE-CVE-2017-7742: In libsndfile before 1.0.28, an error in the "flac_buffer_copy()" function (flac.c) can be exploited to cause a segmentation violation (with read memory access) via a specially crafted FLAC file during a resample attempt... 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 Your last release was probably never penetration tested 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, including WAV, AIFF, and FLAC. It provides a simple API for audio file manipulation, making it a critical component in many audio processing applications. However, prior to version 1.0.28, libsndfile contained a vulnerability that could lead to a segmentation violation when processing specially crafted FLAC files, potentially affecting the stability of applications that rely on this library.

Vulnerability Detail

In libsndfile versions before 1.0.28, an error in the 'flac_buffer_copy()' function (located in flac.c) can be exploited to cause a segmentation violation through a specially crafted FLAC file during a resampling attempt. This vulnerability is similar to CVE-2017-7585 and can lead to application crashes or unexpected behavior, as it allows for read memory access violations.

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 or unknown FLAC files until the library is updated. Additionally, consider implementing input validation to filter out potentially harmful files before processing.

Conclusion

The vulnerability in libsndfile prior to version 1.0.28 poses a significant risk to applications that process FLAC files, potentially leading to crashes and instability. It is crucial to update to the patched version to ensure application security and reliability.

See every vulnerability recorded for libsndfile →

Share this vulnerability

FAQ

The CVSS score of this vulnerability is 5.5, indicating a medium severity level.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Visit Vulert Scanner to check if your application is affected without needing to sign up.

libsndfile is commonly used in audio processing applications, digital audio workstations, and any software that requires reading or writing audio files in various formats.

While the primary risk is application instability or crashes, there is no direct risk of data loss. However, unexpected behavior could lead to issues in processing audio data.

If an immediate update is not possible, ensure that you avoid processing untrusted FLAC files and implement input validation to mitigate potential 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