The session extension in PHP 4 before 4.4.5, and PHP 5 before 5.2.1, calculates the reference count for the session variables without considering the internal pointer from the session globals, which allows context-dependent attackers to execute arbitrary code via a crafted string in the session_register after unsetting HTTP_SESSION_VARS and _SESSION, which destroys the session data Hashtable.
h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?lang=en&cc=us&objectID=c01056506
h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?lang=en&cc=us&objectID=c01086137
secunia.com/advisories/25056
secunia.com/advisories/25057
secunia.com/advisories/25062
secunia.com/advisories/25423
secunia.com/advisories/25445
secunia.com/advisories/25850
security.gentoo.org/glsa/glsa-200705-19.xml
www.debian.org/security/2007/dsa-1283
www.novell.com/linux/security/advisories/2007_32_php.html
www.php-security.org/MOPB/MOPB-30-2007.html
www.securityfocus.com/bid/23119
www.ubuntu.com/usn/usn-455-1
www.vupen.com/english/advisories/2007/1991
www.vupen.com/english/advisories/2007/2374
exchange.xforce.ibmcloud.com/vulnerabilities/33520