The cURL extension files (1) ext/curl/interface.c and (2) ext/curl/streams.c in PHP before 5.1.5 permit the CURLOPT_FOLLOWLOCATION option when open_basedir or safe_mode is enabled, which allows attackers to perform unauthorized actions, possibly related to the realpath cache.
http://www.vupen.com/english/advisories/2006/3318
http://www.securityfocus.com/bid/19582
http://www.securityfocus.com/archive/1/492671/100/0/threaded
http://www.php.net/release_5_1_5.php
http://www.php.net/ChangeLog-5.php#5.1.5
http://secunia.com/advisories/30411