[UNIX] Multiple Remote Vulnerabilities in PHP's Fileupload Code
From: support@securiteam.comDate: 02/28/02
- Previous message: support@securiteam.com: "[NT] Malformed Data Transfer Request Causes Windows SMTP Service to Fail"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: support@securiteam.com To: list@securiteam.com Date: Thu, 28 Feb 2002 09:32:16 +0100 (CET)
The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com
- - promotion
When was the last time you checked your server's security?
How about a monthly report?
http://www.AutomatedScanning.com - Know that you're safe.
- - - - - - - - -
Multiple Remote Vulnerabilities in PHP's Fileupload Code
------------------------------------------------------------------------
SUMMARY
e-Matters found several flaws in the way PHP handles multipart/form-data
POST requests. Each of the flaws could allow an attacker to execute
arbitrary code on the victim's system.
DETAILS
Vulnerable systems:
PHP v3.10-v3.18, v4.0.1-v4.1.1
PHP supports multipart/form-data POST requests (as described in RFC1867)
known as POST fileuploads. Unfortunately, there are several flaws in the
php_mime_split function that could be used by an attacker to execute
arbitrary code. During e-Matters' research, they have found out that not
only PHP4 but also older versions from the PHP3 tree are vulnerable.
The following is a list of bugs we found:
PHP 3.10-3.18
- Broken boundary check (hard to exploit)
- Arbitrary heap overflow (easy exploitable)
PHP 4.0.1-4.0.3pl1
- Broken boundary check (hard to exploit)
- Heap off by one (easy exploitable)
PHP 4.0.2-4.0.5
- 2 broken boundary checks (one very easy and one hard to exploit)
PHP 4.0.6-4.0.7RC2
- Broken boundary check (very easy to exploit)
PHP 4.0.7RC3-4.1.1
- Broken boundary check (hard to exploit)
Finally, e-Matters mentions that most of these vulnerabilities are
exploitable only on Linux or Solaris. However, the heap off by one is only
exploitable on x86 architecture and the arbitrary heap overflow in PHP3 is
exploitable on most OS and architectures. (This includes *BSD)
Users running PHP 4.2.0-dev from CVS are not vulnerable to any of the
described bugs because the fileupload code was completely rewritten for
the 4.2.0 branch.
Vendor response:
27 February 2002 An updated version of PHP and the patch for these
vulnerabilities are now available at: <http://www.php.net/downloads.php>
http://www.php.net/downloads.php
Recommendation:
If you are running PHP 4.0.3 or above one way to workaround these bugs is
to disable the fileupload support within your php.ini (file_uploads = Off)
If you are running PHP as module keep in mind to restart the web server.
Anyway, you should better install the fixed or a properly patched version
to be safe.
ADDITIONAL INFORMATION
The information has been provided by <mailto:security@e-matters.de>
E-Matters.
========================================
This bulletin is sent to members of the SecuriTeam mailing list.
To unsubscribe from the list, send mail with an empty subject line and body to: list-unsubscribe@securiteam.com
In order to subscribe to the mailing list, simply forward this email to: list-subscribe@securiteam.com
====================
====================
DISCLAIMER:
The information in this bulletin is provided "AS IS" without warranty of any kind.
In no event shall we be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages.
- Previous message: support@securiteam.com: "[NT] Malformed Data Transfer Request Causes Windows SMTP Service to Fail"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|