Out-of-Bounds Read Vulnerability in libarchive: CVE-2017-5601

libarchive Updated 02 Oct 2025

Summary

27/01/2017
N/A
Yes i
High
7.5

ALPINE-CVE-2017-5601: An error in the lha_read_file_header_1() function (archive_read_support_format_lha.c) in libarchive 3.2.2 allows remote attackers to trigger an out-of-bounds read memory access and subsequently cause a crash via a specia... Affects libarchive versions < 3.2.2-r0. Fixed in 3.2.2-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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

libarchive is a widely-used library that provides a flexible interface for reading and writing archive files. It supports various archive formats, allowing developers to handle compressed files efficiently. However, libarchive versions prior to 3.2.2-r0 for Alpine v3.4 and 3.2.2-r1 for Alpine v3.5 are vulnerable to an out-of-bounds read, which can lead to application crashes when processing specially crafted archives.

Vulnerability Detail

The vulnerability stems from an error in the lha_read_file_header_1() function located in archive_read_support_format_lha.c within libarchive version 3.2.2. This flaw allows remote attackers to exploit the library by sending specially crafted archive files, triggering an out-of-bounds read memory access. The consequences of this vulnerability can lead to application crashes, potentially affecting the availability of services that rely on libarchive for archive handling.

How To Fix

Minimum fixed version

3.2.2-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 immediate patching is not feasible, consider implementing input validation to reject untrusted or malformed archive files. This can help mitigate the risk of exploitation until the package is updated.

Conclusion

CVE-2017-5601 is a significant vulnerability in the libarchive library that can lead to application crashes due to out-of-bounds memory access. It is crucial for users of affected versions to update their packages promptly to ensure the security and stability of their applications.

See every vulnerability recorded for libarchive →

Share this vulnerability

FAQ

CVE-2017-5601 is a vulnerability in the libarchive library that allows remote attackers to cause an out-of-bounds read memory access, leading to application crashes.

libarchive versions prior to 3.2.2-r0 for Alpine v3.4 and 3.2.2-r1 for Alpine v3.5 are affected by this vulnerability.

You can use Vulert, which monitors open-source vulnerabilities in your software. By simply providing a manifest file like package-lock.json, you can check for vulnerabilities without any installation.

The vulnerability can lead to application crashes, affecting the availability and reliability of services that utilize the libarchive library.

Implement input validation to reject untrusted or malformed archive files as a temporary workaround until the package can be updated.

Related vulnerabilities

Recent vulnerabilities recorded for libarchive.

How To Fix

Minimum fixed version

3.2.2-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