Use-after-free in PHP - CVE-2014-8142

 

Use-after-free in PHP - CVE-2014-8142

Published: November 27, 2018 / Updated: June 17, 2021


Vulnerability identifier: #VU16100
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-2014-8142
CWE-ID: CWE-416
Exploitation vector: Remote access
Exploit availability: Public exploit is available

Vulnerability details

The vulnerability allows a remote attacker to compromise vulnerable system.

The vulnerability exists due to use-after-free vulnerability in the process_nested_data function in ext/standard/var_unserializer.re in PHP before 5.4.36, 5.5.x before 5.5.20, and 5.6.x before 5.6.4. A remote attacker can trigger memory corruption via a crafted unserialize call that leverages improper handling of duplicate keys within the serialized properties of an object and execute arbitrary code. Successful exploitation of the vulnerability may allow an attacker to compromise vulnerable system.


Affected software

PHP
Gentoo Linux
Amazon Linux AMI
Slackware Linux
Fedora
php5 (Ubuntu package)
php

How to mitigate CVE-2014-8142

Install update from vendor's website.

PHP - addressed in versions 5.4.36, 5.5.20, 5.6.4
php5 (Ubuntu package) - addressed in versions 5.3.10-1ubuntu3.16, 5.5.9+dfsg-1ubuntu4.6, 5.5.12+dfsg-2ubuntu4.2
php - addressed in versions 5.6.4-2.fc21, 5.6.5-1.fc21

Links to Public Exploits and PoC-codes

External References

Related Security Bulletins