vendor:
PHP
by:
Stefan Esser
7.5
CVSS
HIGH
Memory Corruption
119
CWE
Product Name: PHP
Affected Version From: PHP 4
Affected Version To: PHP 4
Patch Exists: YES
Related CWE:
CPE:
Platforms Tested:
2007
PHP 4 – ZVAL Reference Counter Overflow
This exploit takes advantage of a reference counter overflow vulnerability in PHP 4. By creating a string with the same size as a Hashtable and creating a large number of references to it, the reference counter overflows and the string gets freed. Then, by freeing more zvals and creating a new array with a specific key, the exploit gains access to the Hashtable's content and can execute code in the shellcode.
Mitigation:
Upgrade to a newer version of PHP as this vulnerability was fixed in later versions. Additionally, ensure that all user input is properly validated and sanitized to prevent any potential exploitation.