The array_user_key_compare function in PHP 4.4.6 and earlier, and 5.x up to 5.2.1, makes erroneous calls to zval_dtor, which triggers memory corruption and allows local users to bypass safe_mode and execute arbitrary code via a certain unset operation after array_user_key_compare has been called.
http://www.vupen.com/english/advisories/2007/2732
http://www.ubuntu.com/usn/usn-455-1
http://www.securityfocus.com/bid/25159
http://www.securityfocus.com/bid/22990
http://us2.php.net/releases/5_2_2.php
http://us2.php.net/releases/4_4_7.php
http://security.gentoo.org/glsa/glsa-200705-19.xml
http://secunia.com/advisories/26235
http://secunia.com/advisories/25445
http://secunia.com/advisories/25057
http://secunia.com/advisories/25056
http://secunia.com/advisories/24542
http://lists.apple.com/archives/security-announce//2007/Jul/msg00004.html