Critical Memory Corruption Vulnerability in p7zip Package

p7zip Updated 02 Oct 2025

Summary

31/01/2018
N/A
Yes i
High
7.8

ALPINE-CVE-2018-5996: Insufficient exception handling in the method NCompress::NRar3::CDecoder::Code of 7-Zip before 18.00 and p7zip can lead to multiple memory corruptions within the PPMd code, allows remote attackers to cause a denial of se... Affects p7zip versions < 16.02-r3. Fixed in 16.02-r3. 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

p7zip is a command-line port of the 7-Zip file archiver, which is widely used for compressing and decompressing files. It supports various archive formats, including RAR, ZIP, and 7z. The package is known for its high compression ratio and is commonly utilized in Unix-like operating systems, including Alpine Linux. However, it has been found to have a critical vulnerability that can lead to severe security risks.

Vulnerability Detail

The vulnerability, identified as CVE-2018-5996, arises from insufficient exception handling in the NCompress::NRar3::CDecoder::Code method of p7zip. This flaw can lead to multiple memory corruptions within the PPMd code, allowing remote attackers to exploit crafted RAR archives. The consequences include potential denial of service (segmentation fault) or arbitrary code execution, posing a significant threat to systems utilizing this package.

How To Fix

Minimum fixed version

16.02-r3

This is the first release that contains the fix.

sudo apk add --upgrade p7zip

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 opening untrusted RAR archives until the package is updated. Additionally, consider using alternative archiving tools that do not have this vulnerability.

Conclusion

The p7zip package has a critical vulnerability (CVE-2018-5996) that can lead to severe security risks, including memory corruption and arbitrary code execution. Users are advised to update to the patched version 16.02-r3 or later to mitigate these risks. For real-time monitoring of vulnerabilities, consider using Vulert.

See every vulnerability recorded for p7zip →

Share this vulnerability

FAQ

CVE-2018-5996 is a critical vulnerability in the p7zip package that can lead to memory corruption and potential remote code execution.

You can use Vulert to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected without any signup.

The CVSS score of CVE-2018-5996 is 7.8, indicating a high severity level.

If immediate updates are not possible, refrain from using untrusted RAR files and consider alternative archiving tools until the vulnerability is patched.

More information about p7zip can be found on its official website or through its documentation, which details its features and usage.

Related vulnerabilities

Recent vulnerabilities recorded for p7zip.

How To Fix

Minimum fixed version

16.02-r3

This is the first release that contains the fix.

sudo apk add --upgrade p7zip

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