Stack-based buffer overflow in PHP - CVE-2020-7065

 

Stack-based buffer overflow in PHP - CVE-2020-7065

Published: March 20, 2020


Vulnerability identifier: #VU26260
CSH Severity: High
CVSS v4: 9.2 [CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2020-7065
CWE-ID: CWE-121
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to execute arbitrary code on the target system.

The vulnerability exists due to a boundary error within php_unicode_tolower_full() function, as demonstrated by the mb_strtolower() call. A remote attacker can pass specially crafted data to the application that uses affected function, trigger stack-based buffer overflow and execute arbitrary code on the target system.

Successful exploitation of this vulnerability may result in complete compromise of vulnerable system.


Affected software

PHP
Gentoo Linux
Debian Linux
Amazon Linux AMI
Red Hat Enterprise Linux for x86_64
Red Hat Enterprise Linux for IBM z Systems
Red Hat Enterprise Linux for Power, little endian
Red Hat Enterprise Linux for ARM 64
Red Hat Enterprise Linux for x86_64 - Extended Update Support
Red Hat Enterprise Linux Server - AUS
Red Hat Enterprise Linux for IBM z Systems - Extended Update Support
Red Hat Enterprise Linux for Power, little endian - Extended Update Support
Red Hat Enterprise Linux Server - TUS
Red Hat Enterprise Linux for ARM 64 - Extended Update Support
Fedora
Red Hat Software Collections
Tenable.sc
php7 (Alpine package)
php7.4 (Ubuntu package)
php
php7.3 (Debian package)
rh-php73-php (Red Hat package)

How to mitigate CVE-2020-7065

Install updates from vendor's website.

PHP - addressed in versions 7.3.16, 7.4.4
Tenable.sc - update to 5.19.0
php7 (Alpine package) - update to 7.3.16-r0
php7.4 (Ubuntu package) - update to 7.4.3-4ubuntu1.1
php - addressed in versions 7.3.16-1.fc30, 7.3.16-1.fc31, 7.4.4-1.fc32
php7.3 (Debian package) - update to 7.3.19-1~deb10u1
rh-php73-php (Red Hat package) - update to 7.3.20-1.el7

External References

Related Security Bulletins