Out-of-Bounds Access Vulnerability in libarchive Package

libarchive Updated 02 Oct 2025

Summary

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

CVE-2024-48958: execute_filter_delta 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 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

libarchive is a widely used library that provides a flexible and efficient way to read and write various archive formats, including tar, zip, and rar. It is integral to many applications and systems that require file compression and decompression functionalities. The library is known for its ability to handle multiple formats seamlessly, making it a popular choice among developers. However, vulnerabilities in libarchive can lead to severe security risks, particularly when processing crafted archive files that may exploit weaknesses in the library's code.

Vulnerability Detail

The vulnerability identified as CVE-2024-48958 arises from the execute_filter_delta function in the archive_read_support_format_rar.c file of libarchive versions prior to 3.7.5. This flaw allows for out-of-bounds access, which can occur when the source pointer (src) moves beyond the destination pointer (dst) during the processing of a specially crafted RAR archive file. The potential ramifications of this vulnerability include unauthorized access to memory, leading to application crashes, data corruption, or even arbitrary code execution, depending on the attacker's intent and the context in which the library is used.

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

As a temporary workaround, users can avoid processing untrusted or crafted RAR archive files until the library is updated. Additionally, implementing strict validation checks on the input files can help mitigate the risk of exploitation.

Conclusion

The CVE-2024-48958 vulnerability in the libarchive package poses significant security risks due to its potential for out-of-bounds memory access. It is essential for users and developers to update to the patched version of the library to safeguard their applications. Additionally, utilizing tools like Vulert can help monitor and manage vulnerabilities effectively.

See every vulnerability recorded for libarchive →

Share this vulnerability

FAQ

CVE-2024-48958 is a security vulnerability in the libarchive library that allows for out-of-bounds memory access when processing crafted RAR archive files.

You can check if your application is affected by using the Vulert playground at Vulert Scanner, which allows you to monitor and alert for open-source vulnerabilities without requiring installation.

The risks include application crashes, data corruption, and potential arbitrary code execution, which can compromise the security of the system using the library.

You can update libarchive by running 'sudo apt update' followed by 'sudo apt install libarchive-dev' in your terminal to ensure you have the patched version.

Yes, avoid processing untrusted RAR files and implement strict validation checks on input files as a temporary measure until the library is updated.

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