Use-after-free error in PHP - CVE-2015-2787
Published: November 27, 2018
Vulnerability identifier: #VU16113
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-2015-2787
CWE-ID: CWE-416
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 weakness exists due to use-after-free vulnerability in the process_nested_data function in ext/standard/var_unserializer.re in PHP before 5.4.39, 5.5.x before 5.5.23, and 5.6.x before 5.6.7. A remote attacker can trigger memory corruption and execute arbitrary code via a crafted unserialize call that leverages use of the unset function within an __wakeup function.
The weakness exists due to use-after-free vulnerability in the process_nested_data function in ext/standard/var_unserializer.re in PHP before 5.4.39, 5.5.x before 5.5.23, and 5.6.x before 5.6.7. A remote attacker can trigger memory corruption and execute arbitrary code via a crafted unserialize call that leverages use of the unset function within an __wakeup function.
Affected software
PHP
php5 (Ubuntu package)
php5 (Ubuntu package)
How to mitigate CVE-2015-2787
Install update from vendor's website.
PHP - addressed in versions 5.4.39, 5.5.23, 5.6.7
php5 (Ubuntu package) - addressed in versions 5.3.2-1ubuntu4.30, 5.3.10-1ubuntu3.18, 5.5.9+dfsg-1ubuntu4.9, 5.5.12+dfsg-2ubuntu4.4
php5 (Ubuntu package) - addressed in versions 5.3.2-1ubuntu4.30, 5.3.10-1ubuntu3.18, 5.5.9+dfsg-1ubuntu4.9, 5.5.12+dfsg-2ubuntu4.4