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,166 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

27th Nov, 2009
New advisories: 8
New vulnerabilities: 15
Updated advisories: 11

Moderately // 301 views
Ubuntu update for php5

26th Nov, 2009
New advisories: 15
New vulnerabilities: 37
Updated advisories: 48

Moderately // 457 views
SugarCRM Multiple Vulnerabilities

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 Charset Inheritance Cross-Site Scripting Vulnerability // 25 views
2. Sun Java JDK / JRE Multiple Vulnerabilities // 19 views
3. Adobe Reader/Acrobat Multiple Vulnerabilities // 18 views
4. Kaspersky Anti-Virus 2010 klavemu.kdl Denial of Service Vulnerability // 15 views
5. Adobe Flash Player Multiple Vulnerabilities // 15 views
6. Internet Explorer Layout Handling Memory Corruption Vulnerability // 10 views
7. Adobe Reader / Acrobat Multiple Vulnerabilities // 9 views
8. Google Chrome Cross-Origin Resource Sharing Security Bypass // 8 views
9. phpBB "gen_rand_string()" Predictable RNG Weakness // 7 views
10. photokorn "dir_path" File Inclusion Vulnerabilities // 6 views