Critical Buffer Overflow Vulnerability in libsndfile: CVE-2018-13139

libsndfile Updated 02 Oct 2025

Summary

04/07/2018
N/A
Yes i
High
8.8

ALPINE-CVE-2018-13139: A stack-based buffer overflow in psf_memset in common.c in libsndfile 1.0.28 allows remote attackers to cause a denial of service (application crash) or possibly have unspecified other impact via a crafted audio file. Affects libsndfile versions < 1.0.28-r4. Fixed in 1.0.28-r4. 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. It provides a simple API for developers to manipulate audio data, making it a crucial component in many audio processing applications. The library supports multiple audio formats and is known for its efficiency and reliability. However, a critical vulnerability has been identified in version 1.0.28, which exposes applications using this library to potential attacks.

Vulnerability Detail

A stack-based buffer overflow in the psf_memset function within common.c of libsndfile version 1.0.28 allows remote attackers to exploit this vulnerability by crafting malicious audio files. This can lead to a denial of service (application crash) or potentially other unspecified impacts. The vulnerability can be triggered by the executable sndfile-deinterleave, which processes audio files. The CVSS score for this vulnerability is 8.8, indicating a high severity level.

How To Fix

Minimum fixed version

1.0.28-r4

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

If updating the package is not immediately feasible, consider implementing input validation to reject any audio files that do not conform to expected formats. This can help mitigate the risk of exploitation until the package is updated.

Conclusion

The vulnerability CVE-2018-13139 in libsndfile poses a significant risk to applications that rely on this library for audio processing. It is crucial to update to the patched version 1.0.28-r4 to mitigate the risk of exploitation. Additionally, using 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-2018-13139 is a critical vulnerability in the libsndfile library that allows for a stack-based buffer overflow, potentially leading to application crashes or other impacts.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.

The CVSS score for this vulnerability is 8.8, indicating a high severity level.

Implement input validation to reject any non-conforming audio files as a temporary workaround until you can update the package.

You can find more information about libsndfile and its functionalities on its official documentation page or repository.

Related vulnerabilities

Recent vulnerabilities recorded for libsndfile.

How To Fix

Minimum fixed version

1.0.28-r4

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