CVE-2019-11048: Temporary files are not cleaned after OOM when parsing HTTP request data
A flaw was found in PHP under a non-default configuration, where it was vulnerable to integer wraparounds during the reception of a multipart POST request. This flaw allows a remote attacker to repeatedly crash PHP and fill the filesystem with temporary PHP files, resulting in a denial of service.
Other sources
Fixed bug (Long variables in multipart/form-data cause OOM and temp files are not cleaned). (CVE-2019-11048)
— PHP
In PHP versions 7.2.x below 7.2.31, 7.3.x below 7.3.18 and 7.4.x below 7.4.6, when HTTP file uploads are allowed, supplying overly long filenames or field names could lead PHP engine to try to allocate oversized memory storage, hit the memory limit and stop processing the request, without cleaning up temporary files created by upload request. This potentially could lead to accumulation of uncleaned temporary files exhausting the disk space on the target server.
There are 2 integers wraparound flaws in php-src/main/rfc1867.c that allow a malicious user to crash PHP during a multipart/form-data file upload. A large multipart/form-data variable, or filename, may cause an integer overflow that leads to a subsequent crash. Temporary files are not cleaned up, and could ultimately fill up the file system containing PHP temporary data.
Upstream Issues:
https://bugs.php.net/bug.php?id=78876 https://bugs.php.net/bug.php?id=78875
— Red Hat
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
redhat/rh-php73-phpto a version that resolves this vulnerability.Fixed in 0:7.3.20-1.el7 - Upgrade
Upgrade
redhat/phpto a version that resolves this vulnerability.Fixed in 7.3.18 - Upgrade
Upgrade
redhat/phpto a version that resolves this vulnerability.Fixed in 7.2.31 - Upgrade
Upgrade
redhat/phpto a version that resolves this vulnerability.Fixed in 7.4.6 - Upgrade
Upgrade
PHPto a version that resolves this vulnerability.Fixed in 7.2.31 - Upgrade
Upgrade
alpine/php7to a version that resolves this vulnerability.Fixed in 7.3.18-r0 - Upgrade
Upgrade
alpine/php7to a version that resolves this vulnerability.Fixed in 7.2.31-r0 - Upgrade
Upgrade
debian/php7.4to a version that resolves this vulnerability.Fixed in 7.4.9-1 - Upgrade
Upgrade
debian/php5to a version that resolves this vulnerability.Fixed in 5.6.40+dfsg-0+deb8u12 - Upgrade
Upgrade
debian/php7.0to a version that resolves this vulnerability.Fixed in 7.0.33-0+deb9u8 - Upgrade
Upgrade
debian/php7.3to a version that resolves this vulnerability.Fixed in 7.3.19-1~deb10u1 - Upgrade
Upgrade
PHPto a version that resolves this vulnerability.Fixed in 7.3.18 - Upgrade
Upgrade
PHPto a version that resolves this vulnerability.Fixed in 7.4.6 - Configuration
Set post_max_size to a value less than 2GB, or leave it at the default value.
PHP post_max_size = less than 2GB or default
Event History
Parent advisories
This vulnerability appears in the following advisories.
Frequently Asked Questions
What is CVE-2019-11048?
CVE-2019-11048 is a vulnerability in PHP versions 7.2.x below 7.2.31, 7.3.x below 7.3.18, and 7.4.x below 7.4.6 that could allow memory allocation errors when handling overly long filenames or field names in HTTP file uploads.
How does CVE-2019-11048 affect PHP?
CVE-2019-11048 affects PHP versions 7.2.x below 7.2.31, 7.3.x below 7.3.18, and 7.4.x below 7.4.6 when HTTP file uploads are allowed.
What is the severity of CVE-2019-11048?
The severity rating of CVE-2019-11048 is high with a CVSS severity score of 7.5.
How can I fix CVE-2019-11048?
To fix CVE-2019-11048, you should update your PHP installation to version 7.2.31, 7.3.18, or 7.4.6 depending on the affected version range.
Where can I find more information about CVE-2019-11048?
You can find more information about CVE-2019-11048 on the official PHP bug tracker and Red Hat Bugzilla.