CVE-2018-1000878: Use After Free Vulnerability in libarchive RAR Decoder
Summary
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 ↓
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.
No signup required · Results in about 60 seconds
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 →
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.
References
Related vulnerabilities
Recent vulnerabilities recorded for libarchive.