CVE-2006-0931: PEAR::Archive_Tar Directory Traversal Vulnerability
Summary
CVE-2006-0931: PEAR::Archive_Tar Directory Traversal vulnerability. Affects pear/archive_tar versions >= 1.2, < 1.3.2. Fixed in 1.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
PEAR::Archive_Tar is a widely used PHP library that provides functionality for creating and manipulating TAR archives. It is commonly utilized in various PHP applications for packaging and distributing files. The library allows users to extract and create TAR files easily, making it a valuable tool for developers. However, certain versions of this library, specifically versions prior to 1.3.2, are vulnerable to a directory traversal attack, which can lead to unauthorized file access and manipulation.
Vulnerability Detail
The vulnerability in PEAR::Archive_Tar arises from improper handling of file paths in TAR archives. Attackers can exploit this flaw by crafting malicious TAR files that contain specially designed pathnames. When these files are processed by the vulnerable library, it may allow the attacker to create or overwrite arbitrary files on the server, potentially leading to data loss, unauthorized access, or system compromise. This vulnerability is classified as critical due to its potential impact on affected systems.
How To Fix
Minimum fixed version
1.3.2
This is the first release that contains the fix.
composer require pear/archive_tar:1.3.2
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
If immediate upgrading is not feasible, a temporary workaround is to implement strict validation of file paths before processing TAR files. Ensure that the application does not allow extraction of files outside of designated directories. This can be done by sanitizing input paths and checking for traversal characters such as '../'.
Conclusion
The PEAR::Archive_Tar directory traversal vulnerability (CVE-2006-0931) poses a significant risk to applications using affected versions of the library. It is crucial to update to version 1.3.2 or later to mitigate this risk. Implementing proper validation and using tools like Vulert can help monitor and address vulnerabilities effectively.
See every vulnerability recorded for pear/archive_tar →
FAQ
A directory traversal vulnerability allows an attacker to access files and directories that are stored outside the intended directory. This can lead to unauthorized file access and manipulation.
You can check if your application is affected by using Vulert, which monitors open-source vulnerabilities in real-time. You can use the Vulert playground to analyze your composer.lock file without any signup.
The risks include unauthorized access to sensitive files, potential data loss, and the possibility of executing malicious code on the server.
Yes, you can implement strict validation of file paths and ensure that your application does not allow extraction of files outside designated directories.
The CVSS score for this vulnerability is 9.1, indicating a critical level of severity.
Related vulnerabilities
Recent vulnerabilities recorded for pear/archive_tar.