Integer overflow in PHP - CVE-2017-5340

 

Integer overflow in PHP - CVE-2017-5340

Published: May 21, 2018


Vulnerability identifier: #VU12910
CSH Severity: High
CVSS v4: 9.3 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2017-5340
CWE-ID: CWE-190
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to cause DoS condition or execute arbitrary code on the target system.

The weakness exists in zend/zend_hash.c due to mishandling certain cases that require large array allocations. A remote attacker can submit specially crafted serialized data and cause the service to crash or execute arbitrary code.

Successful exploitation of the vulnerability may result in system compromise.

Affected software

PHP
Arch Linux
Amazon Linux AMI
Red Hat Enterprise Linux for x86_64
Red Hat Enterprise Linux for Power
Ubuntu
php7.0-cgi (Ubuntu package)
libapache2-mod-php7.0 (Ubuntu package)
php7.0-cli (Ubuntu package)
php7.0-fpm (Ubuntu package)

How to mitigate CVE-2017-5340

Update to version 7.0.15 or 7.1.1.

php7.0-cgi (Ubuntu package) - addressed in versions 7.0.15-0ubuntu0.16.04.2, 7.0.15-0ubuntu0.16.10.2
libapache2-mod-php7.0 (Ubuntu package) - addressed in versions 7.0.15-0ubuntu0.16.04.2, 7.0.15-0ubuntu0.16.10.2
php7.0-cli (Ubuntu package) - addressed in versions 7.0.15-0ubuntu0.16.04.2, 7.0.15-0ubuntu0.16.10.2
php7.0-fpm (Ubuntu package) - addressed in versions 7.0.15-0ubuntu0.16.04.2, 7.0.15-0ubuntu0.16.10.2

External References

Related Security Bulletins