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.
https://euvd.enisa.europa.eu/vulnerability/EUVD-2006-4471
http://www.vupen.com/english/advisories/2006/3318
http://www.php.net/release_5_1_5.php
http://www.php.net/ChangeLog-5.php#5.1.5
http://www.novell.com/linux/security/advisories/2006_52_php.html
http://wiki.rpath.com/wiki/Advisories:rPSA-2008-0178
http://securitytracker.com/id?1016984
http://secunia.com/advisories/30411
http://secunia.com/advisories/22039
http://secunia.com/advisories/21546
http://cvs.php.net/viewvc.cgi/php-src/ext/curl/streams.c?r1=1.14.2.2.2.3&r2=1.14.2.2.2.4
http://cvs.php.net/viewcvs.cgi/php-src/ext/curl/interface.c?view=log
http://cvs.php.net/viewcvs.cgi/php-src/ext/curl/interface.c?r1=1.62.2.14.2.6&r2=1.62.2.14.2.7