CVE-2018-1000878: Use After Free Vulnerability in libarchive RAR Decoder

libarchive Updated 02 Oct 2025

Summary

20/12/2018
N/A
Yes i
High
8.8

CVE-2018-1000878: libarchive version commit 416694915449219d505531b1096384f3237dd6cc onwards (release v3.1.0 onwards) contains a CWE-416: Use After Free vulnerability in RAR decoder - libarchive/archive_read_support_format_rar.c that can... Affects libarchive across 2 version ranges.

< 3.3.3-2 >= 581841b85e88489a1804c8cba84f4615c9145698, < 614110e76d9dbb9ed3e159a71cbd75fa3b23efe3

Fixed in 3.3.3-2. 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 for reading and writing various archive formats, including tar, zip, and rar. It provides a flexible and efficient way to handle compressed files and is utilized in many applications across different platforms. The library is known for its ability to support multiple formats and its robust performance. However, a vulnerability has been identified in the RAR decoder of libarchive, which could potentially lead to severe consequences if exploited.

Vulnerability Detail

The vulnerability, identified as CVE-2018-1000878, is a Use After Free issue located in the RAR decoder of libarchive (specifically in the file archive_read_support_format_rar.c). This flaw arises when the library improperly manages memory, allowing an attacker to craft a specially designed RAR archive that, when opened by a victim, can cause a crash or denial of service (DoS). While it is currently unknown whether remote code execution (RCE) is possible, the potential for exploitation remains a significant concern. The vulnerability affects versions of libarchive starting from commit 416694915449219d505531b1096384f3237dd6cc and is present in all releases from v3.1.0 onwards.

How To Fix

Minimum fixed version

3.3.3-2

This is the first release that contains the fix.

sudo apt-get install --only-upgrade libarchive

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary measure, users can avoid opening untrusted or specially crafted RAR archives until the library is updated. Additionally, consider using alternative archive handling tools that do not rely on libarchive for RAR files.

Conclusion

CVE-2018-1000878 presents a significant risk to users of the libarchive library due to its Use After Free vulnerability in the RAR decoder. It is crucial for users to upgrade to the fixed version to mitigate potential attacks. Awareness and caution when handling RAR files are also recommended until the vulnerability is addressed.

See every vulnerability recorded for libarchive →

Share this vulnerability

FAQ

CVE-2018-1000878 is a vulnerability in the libarchive library that allows for a Use After Free condition in the RAR decoder, potentially leading to crashes or denial of service.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

The primary risk is a crash or denial of service when a specially crafted RAR archive is opened. There is also a concern about the potential for remote code execution, although this is not confirmed.

If an immediate upgrade is not possible, avoid opening untrusted RAR files and consider using alternative tools for handling archives.

The CVSS score for CVE-2018-1000878 is 8.8, indicating a high severity level.

Related vulnerabilities

Recent vulnerabilities recorded for libarchive.

How To Fix

Minimum fixed version

3.3.3-2

This is the first release that contains the fix.

sudo apt-get install --only-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