Code Injection in PHP - CVE-2006-4812

 

Code Injection in PHP - CVE-2006-4812

Published: October 30, 2018 / Updated: June 9, 2025


Vulnerability identifier: #VU110468
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-2006-4812
CWE-ID: CWE-94
Exploitation vector: Remote access
Exploit availability: Public exploit is available

Vulnerability details

The vulnerability allows a remote non-authenticated attacker to execute arbitrary code.

Integer overflow in PHP 5 up to 5.1.6 and 4 before 4.3.0 allows remote attackers to execute arbitrary code via an argument to the unserialize PHP function with a large value for the number of array elements, which triggers the overflow in the Zend Engine ecalloc function (Zend/zend_alloc.c).


Affected software

PHP
Gentoo Linux
dev-lang/php

How to mitigate CVE-2006-4812

Install update from vendor's website.

PHP - update to 4.10
dev-lang/php - update to 5.1.6-r6

Links to Public Exploits and PoC-codes

External References

Related Security Bulletins