Safe Mode feature (safe_mode) in PHP 3.0 through 4.1.0 allows attackers with access to the MySQL database to bypass Safe Mode access restrictions and read arbitrary files using "LOAD DATA INFILE LOCAL" SQL statements.
http://www.securityfocus.com/bid/4026
http://www.iss.net/security_center/static/8105.php
http://marc.info/?l=ntbugtraq&m=101303819613337&w=2
http://marc.info/?l=ntbugtraq&m=101303065423534&w=2
http://marc.info/?l=ntbugtraq&m=101285016125377&w=2