Critical Vulnerability in PHP Package: CVE-2020-7062 - Null Pointer Dereference During File Upload
Summary
UBUNTU-CVE-2020-7062: In PHP versions 7.2.x below 7.2.28, 7.3.x below 7.3.15 and 7.4.x below 7.4.3, when using file upload functionality, if upload progress tracking is enabled, but session.upload_progress.cleanup is set to 0 (disabled), and... Affects php5 versions < 5.5.9+dfsg-1ubuntu4.29+esm11. Fixed in 5.5.9+dfsg-1ubuntu4.29+esm11. 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
PHP is a widely-used open-source scripting language designed for web development but also used as a general-purpose programming language. It is known for its ease of integration with HTML and databases, making it a popular choice for building dynamic web applications. The package versions affected by this vulnerability include PHP 7.2.x below 7.2.28, 7.3.x below 7.3.15, and 7.4.x below 7.4.3. The vulnerability arises when upload progress tracking is enabled but the cleanup setting is disabled, leading to potential crashes during file uploads.
Vulnerability Detail
The vulnerability, identified as CVE-2020-7062, occurs in PHP when the file upload functionality is used with upload progress tracking enabled, but the session.upload_progress.cleanup setting is set to 0 (disabled). If a file upload fails, the upload procedure attempts to clean up non-existent data, resulting in a null pointer dereference. This can lead to a crash of the PHP process, potentially affecting the availability of the web application and exposing it to denial-of-service attacks.
How To Fix
Minimum fixed version
5.5.9+dfsg-1ubuntu4.29+esm11
This is the first release that contains the fix.
sudo apt-get install --only-upgrade php5
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, you can disable upload progress tracking by setting 'session.upload_progress.cleanup' to 1 in your php.ini configuration file. This can prevent the null pointer dereference issue from occurring during file uploads.
Conclusion
CVE-2020-7062 represents a significant vulnerability in PHP that can lead to application crashes during file uploads. It is crucial for developers and system administrators to update their PHP installations to the patched versions to mitigate this risk. Utilizing tools like Vulert can help in monitoring and managing such vulnerabilities effectively.
See every vulnerability recorded for php5 →
FAQ
CVE-2020-7062 is a vulnerability in PHP that can lead to a null pointer dereference during file uploads, potentially causing application crashes.
The affected versions include PHP 7.2.x below 7.2.28, 7.3.x below 7.3.15, and 7.4.x below 7.4.3.
You can use the Vulert platform to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected.
The vulnerability can lead to application crashes and denial-of-service attacks, affecting the availability of web applications.
Yes, patches are available for the affected PHP versions. Updating to the specified patched versions will resolve the vulnerability.
Related vulnerabilities
Recent vulnerabilities recorded for php5.