Double free vulnerability in the session extension in PHP 5.2.0 and 5.2.1 allows context-dependent attackers to execute arbitrary code via illegal characters in a session identifier, which is rejected by an internal session storage module, which calls the session identifier generator with an improper environment, leading to code execution when the generator is interrupted, as demonstrated by triggering a memory limit violation or certain PHP errors.
http://www.vupen.com/english/advisories/2007/0960
http://www.securityfocus.com/bid/22971
http://www.novell.com/linux/security/advisories/2007_32_php.html