Out-of-Bounds Write Vulnerability in cabextract and libmspack Packages
Summary
ALPINE-CVE-2018-18584: In mspack/cab.h in libmspack before 0.8alpha and cabextract before 1.8, the CAB block input buffer is one byte too small for the maximal Quantum block, leading to an out-of-bounds write. Affects cabextract versions < 1.8-r0. Fixed in 1.8-r0. 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
cabextract is a utility for extracting files from Microsoft Cabinet (.cab) files, widely used for software distribution. libmspack is a library for handling Microsoft compressed files, including .cab files. Both packages are integral for managing compressed file formats, but they are vulnerable to a critical issue that can lead to security breaches.
Vulnerability Detail
In mspack/cab.h in libmspack before version 0.8alpha and cabextract before version 1.8, the CAB block input buffer is one byte too small for the maximal Quantum block. This flaw can lead to an out-of-bounds write, potentially allowing an attacker to execute arbitrary code or crash the application, thereby compromising system integrity and availability.
How To Fix
Minimum fixed version
1.8-r0
This is the first release that contains the fix.
sudo apk add --upgrade cabextract
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
If you cannot update the packages immediately, consider disabling the use of cabextract and libmspack in your applications until a patch is applied. This can be done by removing the packages temporarily with:
apk del cabextract libmspack
Conclusion
The out-of-bounds write vulnerability in cabextract and libmspack poses significant risks to systems utilizing these packages. It is crucial to update to the patched versions to mitigate potential security threats. Regular monitoring and vulnerability management practices, such as using tools like Vulert, can help maintain software security.
See every vulnerability recorded for cabextract →
FAQ
The CVSS score of this vulnerability is 6.5, indicating a medium severity level.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. You can check your application using the Vulert playground at Vulert Scanner without any signup.
Exploitation of this vulnerability could lead to arbitrary code execution or application crashes, compromising system security and stability.
As of now, there are no publicly known exploits specifically targeting this vulnerability, but it is advisable to apply the patch as a precaution.
Using older versions of these packages is not safe due to the identified vulnerability. It is recommended to update to the latest patched versions.
References
Related vulnerabilities
Recent vulnerabilities recorded for cabextract.