Secunia Logo
Netsikker nu! 2008
 
PHP Multiple Vulnerabilities
Secunia Advisory: SA13481
Release Date: 2004-12-16
Last Update: 2005-03-21
Popularity: 44,836 views

Critical:
Highly critical
Impact: Security Bypass
Exposure of sensitive information
Privilege escalation
System access
Where: From remote
Solution Status: Vendor Patch

Software:PHP 4.3.x
PHP 5.0.x

Subscribe: Instant alerts on relevant vulnerabilities

CVE reference:CVE-2004-1018
CVE-2004-1019
CVE-2004-1063
CVE-2004-1064
CVE-2004-1065


Description:
Multiple vulnerabilities have been reported in PHP, which can be exploited to gain escalated privileges, bypass certain security restrictions, gain knowledge of sensitive information, or compromise a vulnerable system.

1) An integer overflow in the "pack()" function can be exploited to cause a heap-based buffer overflow by passing some specially crafted parameters to the function.

Successful exploitation bypasses the safe_mode feature and allows execution of arbitrary code with the privileges of the web server.

2) An integer overflow in the "unpack()" function can be exploited to leak information stored on the heap by passing specially crafted parameters to the function.

In combination with the first vulnerability, this may also allow bypassing of heap canary protection mechanisms.

3) An error within safe_mode when executing commands can be exploited to bypass the safe_mode_exec_dir restriction by injecting shell commands into the current directory name.

Successful exploitation requires that PHP runs on a multi-threaded Unix web server.

4) An error in safe_mode combined with certain implementations of "realpath()" can be exploited to bypass safe_mode via a specially crafted file path.

5) An error within the handling of file paths may potentially lead to file inclusion vulnerabilities. The problem is that "realpath()", which in some implementations truncate filenames, is used in various places to obtain the real path of a file.

6) Various errors within the deserialization code can be exploited to disclose information or execute arbitrary code via specially crafted strings passed to the "unserialize()" function.

7) A signedness error in the "shmop_write()" function can be exploited to write data to arbitrary memory locations by passing an overly large value to the "offset" parameter.

Successful exploitation may allow execution of arbitrary code with the privileges of the web server and bypass the safe_mode restrictions.

8) An unspecified boundary error exists in the "exif_read_data()" function when handling long section names.

9) An error in the "addslashes()" function causes it to not escape NULL bytes correctly. This can e.g. be exploited to read arbitrary files on a system, if the "include()" or "require()" statements partly use user-supplied input.

10) An error within "magic_quotes_gpc" may allow a one-level directory traversal when uploading files with a single quote in the filename (e.g. "..'file.ext").

NOTE: Other potential security issues have also been reported.

Solution:
Update to version 4.3.10 or 5.0.3.
http://www.php.net/downloads.php

Provided and/or discovered by:
1-6) Stefan Esser
6) Marcus Boerger
7) Stefano Di Paola
8) Reported by vendor.
9-10) Daniel Fabian

Changelog:
2004-12-17: Updated credits.
2004-12-20: Added more information.
2005-01-21: Added additional information about issue #7.
2005-03-21: Added CVE references.

Original Advisory:
PHP:
http://www.php.net/release_4_3_10.php

Stefan Esser:
http://www.hardened-php.net/advisories/012004.txt


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

7th Oct, 2008
New advisories: 19
New vulnerabilities: 68
Updated advisories: 62

Moderately // 290 views
Debian update for php5
Moderately // 218 views
Atarone CMS Multiple Vulnerabilities
Moderately // 248 views
Debian update for squid
Less // 251 views
SUSE update for mercurial
Moderately // 292 views
SUSE update for openssh
Less // 233 views
Fedora update for mediawiki

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. Zeroboard Two Vulnerabilities // 61 views
2. Zeroboard Multiple Vulnerabilities // 41 views
3. Debian update for php5 // 34 views
4. Atarone CMS Multiple Vulnerabilities // 29 views
5. Debian update for squid // 28 views
6. SUSE update for mercurial // 27 views
7. H-Sphere webshell4 Cross-Site Scripting and Request Forgery // 25 views
8. Juniper Products Neighbor Discovery Protocol Neighbor Solicitation Vulnerability // 23 views
9. SUSE update for openssh // 23 views
10. Fedora update for mediawiki // 23 views