Critical Vulnerability in PHP Package: CVE-2020-7062 - Null Pointer Dereference During File Upload

php5 Updated 02 Oct 2025

Summary

27/02/2020
N/A
Yes i
High
7.5

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 ↓

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 Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

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 →

Share this vulnerability

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.

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 →

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