Out-of-Bounds Access Vulnerability in libarchive: CVE-2024-48957

libarchive Updated 02 Oct 2025

Summary

10/10/2024
N/A
Yes i
High
7.8

CVE-2024-48957: execute_filter_audio in archive_read_support_format_rar.c in libarchive before 3.7.5 allows out-of-bounds access via a crafted archive file because src can move beyond dst. Affects libarchive across 2 version ranges.

< 3.7.5-r0 >= 9147def1da7ad1bdd47b3559eb1bfeeb0e0f374b, < 12ecf8418ab3595d66cdea1abadcea8b6a9d288b

Fixed in 3.7.5-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

libarchive is a widely used library for reading and writing various archive formats, including tar, zip, and rar. It provides a consistent interface for handling compressed files and is utilized in many applications across different platforms. The library's functionality allows developers to easily integrate archive handling capabilities into their software. However, vulnerabilities in libarchive can lead to severe security risks, particularly when processing untrusted archive files.

Vulnerability Detail

CVE-2024-48957 is a critical vulnerability found in the execute_filter_audio function within the archive_read_support_format_rar.c file of libarchive versions prior to 3.7.5. This vulnerability allows for out-of-bounds access, which can occur when a crafted archive file is processed. The src pointer can move beyond the dst buffer, potentially leading to memory corruption, crashes, or execution of arbitrary code. Attackers can exploit this vulnerability by crafting malicious archive files that, when opened, can compromise the integrity and security of the system.

How To Fix

Minimum fixed version

3.7.5-r0

This is the first release that contains the fix.

sudo apk add --upgrade libarchive

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 possible, consider avoiding the use of libarchive for processing untrusted or unknown archive files until the library can be updated. Additionally, implement strict validation and sanitization of input files to reduce the risk of exploitation.

Conclusion

CVE-2024-48957 is a significant vulnerability in the libarchive library that can lead to severe security risks if not addressed. It is crucial for users and developers to update to the latest version of libarchive to protect their applications from potential exploitation. Additionally, utilizing tools like Vulert can help in monitoring and managing vulnerabilities effectively.

See every vulnerability recorded for libarchive →

Share this vulnerability

FAQ

CVE-2024-48957 is a vulnerability in the libarchive library that allows for out-of-bounds access, potentially leading to memory corruption or arbitrary code execution.

All versions of libarchive prior to 3.7.5 are affected by this vulnerability.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected by CVE-2024-48957.

If an immediate update is not possible, avoid processing untrusted archive files and implement input validation to mitigate risks.

Yes, Vulert provides a solution that uses a manifest file like package-lock.json to monitor and alert for vulnerabilities in real-time without requiring code access.

Related vulnerabilities

Recent vulnerabilities recorded for libarchive.

How To Fix

Minimum fixed version

3.7.5-r0

This is the first release that contains the fix.

sudo apk add --upgrade libarchive

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