CVE-2020-7065: mb_strtolower (UTF-32LE): stack-buffer-overflow at php_unicode_tolower_full
A vulnerability was found in PHP versions 7.3.x below 7.3.16 and 7.4.x below 7.4.34, while using mbstrtolower() function with UTF-32LE encoding, certain invalid strings could cause PHP to overwrite stack-allocated buffer. This could lead to memory corruption, crashes and potentially code execution.
Other sources
A vulnerability was found in PHP while using the mbstrtolower() function with UTF-32LE encoding, where certain invalid strings cause PHP to overwrite the stack-allocated buffer. This flaw leads to memory corruption, crashes, and potential code execution.
Fixed bug (mbstrtolower (UTF-32LE): stack-buffer-overflow at phpunicodetolowerfull). (CVE-2020-7065)
— PHP
In PHP versions 7.3.x below 7.3.16 and 7.4.x below 7.4.4, while using mbstrtolower() function with UTF-32LE encoding, certain invalid strings could cause PHP to overwrite stack-allocated buffer. This could lead to memory corruption, crashes and potentially code execution.
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.16 - Upgrade
Upgrade
redhat/phpto a version that resolves this vulnerability.Fixed in 7.4.4 - Upgrade
Upgrade
PHPto a version that resolves this vulnerability.Fixed in 7.3.16 - Upgrade
Upgrade
debian/php7.4to a version that resolves this vulnerability.Fixed in 7.4.33-1+deb11u5Fixed in 7.4.33-1+deb11u11 - Upgrade
Upgrade
PHPto a version that resolves this vulnerability.Fixed in 7.4.4
Event History
Parent advisories
This vulnerability appears in the following advisories.
Frequently Asked Questions
What is CVE-2020-7065?
CVE-2020-7065 is a vulnerability in PHP versions 7.3.x below 7.3.16 and 7.4.x below 7.4.4 that could lead to memory corruption, crashes, and potentially code execution.
What causes CVE-2020-7065?
CVE-2020-7065 is caused by using the mb_strtolower() function with UTF-32LE encoding and certain invalid strings.
How can CVE-2020-7065 be exploited?
CVE-2020-7065 can be exploited by crafting specially crafted strings to trigger the vulnerability in PHP.
Which versions of PHP are affected by CVE-2020-7065?
PHP versions 7.3.x below 7.3.16 and 7.4.x below 7.4.4 are affected by CVE-2020-7065.
How can CVE-2020-7065 be remediated?
To remediate CVE-2020-7065, update PHP to version 7.3.16 or 7.4.4 or later.