Secunia Logo  


Secunia PSI WorldMap
 
PHP "mb_send_mail()" and IMAP Functions Security Bypass
Secunia Advisory: SA18694
Release Date: 2006-02-28
Last Update: 2007-06-01
Popularity: 13,096 views

Critical:
Less critical
Impact: Security Bypass
Where: Local system
Solution Status: Unpatched

Software:PHP 4.0.x
PHP 4.1.x
PHP 4.2.x
PHP 4.3.x
PHP 4.4.x
PHP 5.0.x
PHP 5.1.x

Secunia CVSS-2 Score: Available in Secunia business solutions

Subscribe: Instant alerts on relevant vulnerabilities


Advisory Content (Page 1 of 3)[ 1 ] [ 2 ] [ 3 ]

Description:
Cdric Clerget has discovered two vulnerabilities in PHP, which can be exploited by malicious people to bypass certain security restrictions.

1) The PHP "mb_send_mail()" function allows additional parameters to be passed to sendmail via the "additional_parameter" parameter. This can be exploited to cause sendmail to read arbitrary files on the system as configuration file and saving the resulting log file to arbitrary writable directories. The saved log file may contain portions of the file that was read as configuration file.

Example:
$additional_param = "-C ".$file_to_read." -X ".getcwd()."/".$output_file;
mb_send_mail($email_address, NULL, NULL, NULL, $additional_param);

Successful exploitation allows the bypassing of certain "safe_mode" and "open_basedir" restrictions.

The vulnerability has been confirmed in version 5.1.2 and also reported in version 4.x. Other versions may also be affected.

2) The PHP imap functions e.g. "imap_open()", "imap_body()", and "imap_list()" can be exploited to read arbitrary files and obtain listings of arbitrary directories even when "safe_mode" and "open_basedir" are configured. It is reportedly also possible to create, delete, and rename files with apache privileges using the "imap_createmailbox()", "imap_deletemailbox()", and "imap_renamemailbox()" functions.

Successful exploitation allows bypassing of certain "safe_mode" and "open_basedir" restrictions.

The vulnerability has been confirmed in PHP version 4.4.2 compiled with c_client 2004g. Other versions may also be affected.

Change Page:
[ 1 ] [ 2 ] [ 3 ]



Track this Secunia Advisory
Customers of the Secunia Vulnerability Intelligence solutions will automatically receive updates when new information regarding this advisory is released.

Read more about our Vulnerability Intelligence solutions and what they can do for you and your company.

About this Secunia Advisory
Please note: The information that this Secunia Advisory is based on comes from a third party unless stated otherwise.

Secunia collects, validates, and verifies all vulnerability reports issued by security research groups, vendors, and others.
  
Latest Advisories

9th Nov, 2009
New advisories: 6
New vulnerabilities: 23
Updated advisories: 66

Not // 224 views
Debian update for pidgin
Less // 260 views
Debian update for linux-2.6
Less // 221 views
Debian update for drupal6
Highly // 251 views
Debian update for nspr

6th Nov, 2009
New advisories: 17
New vulnerabilities: 65
Updated advisories: 21

Less // 448 views
Debian update for linux-2.6.24
Less // 431 views
Debian update for linux-2.6
Moderately // 390 views
Gentoo update for horde

Solutions | More...  


Send Feedback to Secunia
If you have new information regarding this Secunia advisory or a product in our database, please send it to us using either our web form or email us at vuln@secunia.com.

Ideas, suggestions, and other feedback are most welcome.

Most Popular - 3 Hours

1. Internet Explorer Three Vulnerabilities // 75 views
2. Sun Java JDK / JRE Multiple Vulnerabilities // 56 views
3. Internet Explorer Charset Inheritance Cross-Site Scripting Vulnerability // 36 views
4. Mozilla Firefox Multiple Vulnerabilities // 33 views
5. Sun Solaris mod_perl Two Vulnerabilities // 28 views
6. Debian update for nspr // 27 views
7. Linux Kernel 2.4 Multiple Vulnerabilities // 26 views
8. Google Chrome Two Vulnerabilities // 24 views
9. Adobe Flash Player Multiple Vulnerabilities // 23 views
10. Adobe Reader/Acrobat Multiple Vulnerabilities // 21 views