Directory Traversal Vulnerability in php-pear Package - CVE-2020-36193
Summary
CVE-2020-36193: Tar.php in Archive_Tar through 1.4.11 allows write operations with Directory Traversal due to inadequate checking of symbolic links, a related issue to CVE-2020-28948. Affects php-pear across 3 version ranges.
< 1:1.10.12+submodules+notgz+20210212-1
>= 497914920385b7016ac9c9367e0198530787adf2, < 8c555d9b7d3a202cee756104b48e580ae41a6379
< cde460582ff389404b5b3ccb59374e9b389de916
Fixed in 1:1.10.12+submodules+notgz+20210212-1. 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
The php-pear package is a widely used framework and distribution system for reusable PHP components. It provides a structured way to manage libraries and dependencies in PHP applications. However, the package has been found to be vulnerable to a directory traversal issue, specifically in the Archive_Tar component, which can lead to unauthorized write operations.
Vulnerability Detail
CVE-2020-36193 is a directory traversal vulnerability found in Tar.php of the Archive_Tar package through version 1.4.11. This vulnerability arises from inadequate checks on symbolic links, allowing attackers to manipulate file paths and potentially write files outside the intended directory. The ramifications include unauthorized access to sensitive files and the possibility of executing malicious scripts, which could compromise the integrity of the application.
How To Fix
Minimum fixed version
1:1.10.12+submodules+notgz+20210212-1
This is the first release that contains the fix.
sudo apt-get install --only-upgrade php-pear
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, ensure that your application does not allow user input to dictate file paths. Implement strict validation and sanitization of any file paths used in your application to mitigate the risk of directory traversal attacks.
Conclusion
CVE-2020-36193 is a significant vulnerability in the php-pear package that can lead to directory traversal attacks. It is crucial to update to the latest version to mitigate risks. Implementing strict validation on file paths and using tools like Vulert can help monitor and protect against such vulnerabilities.
See every vulnerability recorded for php-pear →
FAQ
CVE-2020-36193 is a vulnerability in the php-pear package that allows directory traversal due to inadequate checks on symbolic links.
This vulnerability can allow attackers to write files outside the intended directories, potentially leading to unauthorized access and execution of malicious code.
The vulnerability affects php-pear versions prior to 1:1.10.12+submodules+notgz+20210212-1.
You can check if your application is affected by using Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Visit Vulert Scanner to test your application without signup.
The CVSS score for CVE-2020-36193 is 7.5, indicating a high severity level.
Related vulnerabilities
Recent vulnerabilities recorded for php-pear.