The c-client library 2000, 2001, or 2004 for PHP before 4.4.4 and 5.x before 5.1.5 do not check the (1) safe_mode or (2) open_basedir functions, and when used in applications that accept user-controlled input for the mailbox argument to the imap_open function, allow remote attackers to obtain access to an IMAP stream data structure and conduct unauthorized IMAP actions.
https://exchange.xforce.ibmcloud.com/vulnerabilities/24964
http://www.vupen.com/english/advisories/2006/0772
http://www.securityfocus.com/archive/1/426339/100/0/threaded
http://www.php.net/release_5_1_5.php
http://www.php.net/ChangeLog-5.php#5.1.5
http://www.mandriva.com/security/advisories?name=MDKSA-2006:122
http://securityreason.com/securityalert/516
http://secunia.com/advisories/21546
http://secunia.com/advisories/21050