Secunia CSI7
Advisories
Research
Forums
Create Profile
Our Commitment
Database
Search
Advisories by Product
Advisories by Vendor
Terminology
Report Vulnerability
Insecure Library Loading
Moderately critical

PHP Multiple Vulnerabilities

-

Release Date:  2007-02-09    Last Update:  2007-04-12    Views:  33,286

Secunia Advisory SA24089

Where:

From remote

Impact:

Unknown, Security Bypass, Exposure of sensitive information, DoS, System access

Solution Status:

Vendor Patch

CVE Reference(s):

Description


Several vulnerabilities and a weakness have been reported in PHP, where some have unknown impacts and others can be exploited by malicious people to disclose potentially sensitive information, bypass certain security restrictions, cause a DoS (Denial of Service) and potentially compromise a vulnerable system.

1) The "safe_mode" and "open_basedir" protection mechanisms can be bypassed via the session extension.

2) Unspecified overflows can be exploited to cause a stack corruption in the session extension.

3) Buffer overflows, some of which are stack based, exist in the "zip", "imap", and "sqlite" (PHP 5) extensions.

4) A boundary error within the stream filters can be exploited to cause a buffer overflow.

5) An integer overflow exists in the "str_replace()" function. This can be exploited to trigger an error when allocating memory and potentially allow the execution of arbitrary code if the function is used on long, untrusted strings.

6) A boundary error in a call to "php_set_session_var()" when importing malicious WDDX data containing a numerical key can be exploited to disclose random memory.

7) An error due to 32 bit truncation in a helper function of the print() functions can lead to memory corruption or exploitable format string vulnerabilities on 64-bit systems.

8) Boundary errors exist within the "mail()", "ibase_add_user()", "ibase_delete_user()", and "ibase_modify_user()" functions, which can be exploited to cause buffer overflows.

9) A format string error exists in the "odbc_result_all()" function. Successful exploitation may allow the execution of arbitrary code, but requires that the attacker has control over the table contents of the used database.

10) An error within the "imap_mail_compose()" function can be exploited to cause a stack based buffer overflow and may allow the execution of arbitrary code if the function is used with untrusted input to create a new MIME message.

11) A weakness within the "zend_hash_init()" function on 64bit systems can be exploited to cause a DoS via CPU consumption until the script times out by triggering an infinite loop when unserializing untrusted data.

12) A vulnerability caused due to an integer overflow in the "unserialize()" function's handling of ZVAL structures can be exploited to corrupt memory and execute arbitrary code.

13) A boundary error in the session serialization handler "php_binary" can be exploited to expose heap memory.

14) Errors in the verification of resource types within the shared memory (shmop) functions can be exploited to read or write to arbitrary memory addresses.

15) A boundary error within the PHP 5 "zip" extension can be exploited to cause a stack-based overflow by passing an overly long string to the "zip:" URL wrapper. This may be related to vulnerability #3.

16) If the "FILTER_SANITIZE_STRING" filter of ext/filter is used in combination with the "FILTER_FLAG_STRIP_LOW " flag, the filtering mechanism can be bypassed via certain low ASCII characters after opening brackets to e.g. conduct cross-site scripting attacks.

17) The FDF (ext/fdf) extension does not correctly call input filtering hooks. If PHP is compiled with FDF support, this can be exploited to bypass the ext/filter input filtering mechanism by sending POST data in the application/vnd.fdf format.

18) A buffer underflow exists within the "FILTER_VALIDATE_INT" filter of the ext/filter extension. This can be exploited to execute arbitrary code, but may require a big-endian system.

19) An error in the "header()" function in PHP 5.2.0 when trimming whitespaces can be exploited to cause memory corruption and may allow execution of arbitrary code on a big-endian system.

20) An error in the session extension in the handling of hashtables can be exploited to replace the hashtable of session variables and allow execution of arbitrary code.

21) An error in the deserialisation of session data can be exploited to overwrite global variables (e.g. the "_SESSION" array) when "register_globals" is enabled.

22) An integer overflow error in the "zip_read_entry()" function in PHP4 can be exploited to cause a heap based buffer overflow by providing a length parameter of "-1". Successful exploitation may allow execution of arbitrary code.

23) An off-by-one error exists in the "php_stream_filter_create()" function (PHP 5) and can be exploited to to cause an off-by-one overflow e.g. via a "php://filter" URL.

24) An integer overflow error exists in the "msg_receive()" function and can be exploited to cause a buffer overflow via the "maxsize" parameter. Reportedly, the vulnerability does not affect PHP running on Linux systems, but e.g. PHP running on FreeBSD.

25) An error exists in the Zend Memory Manager in PHP 5.2.0 where a size value is cast to a signed long. This can be exploited to cause buffer overflows e.g. via the PHP HTTP SOAP client.

Other issues that may be security related have also been reported.

NOTE: Some issues can be triggered remotely under certain circumstances.


Solution:
Update to version 5.2.1 or 4.4.5.

Provided and/or discovered by:
1-5, 7-11) Reported by the vendor.
5, 6, 7, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25) Stefan Esser

Original Advisory:
http://www.php.net/releases/5_2_1.php
http://www.php.net/releases/4_4_5.php
5) http://www.php-security.org/MOPB/MOPB-41-2007.html
6) http://www.php-security.org/MOPB/MOPB-11-2007.html
7) http://www.php-security.org/MOPB/MOPB-38-2007.html
10) http://www.php-security.org/MOPB/MOPB-40-2007.html
12) http://www.php-security.org/MOPB/MOPB-04-2007.html
13) http://www.php-security.org/MOPB/MOPB-10-2007.html
14) http://www.php-security.org/MOPB/MOPB-15-2007.html
15) http://www.php-security.org/MOPB/MOPB-16-2007.html
16) http://www.php-security.org/MOPB/MOPB-18-2007.html
17) http://www.php-security.org/MOPB/MOPB-17-2007.html
18) http://www.php-security.org/MOPB/MOPB-19-2007.html
19) http://www.php-security.org/MOPB/MOPB-25-2007.html
20) http://www.php-security.org/MOPB/MOPB-30-2007.html
21) http://www.php-security.org/MOPB/MOPB-31-2007.html
22) http://www.php-security.org/MOPB/MOPB-35-2007.html
23) http://www.php-security.org/MOPB/MOPB-42-2007.html
24) http://www.php-security.org/MOPB/MOPB-43-2007.html
25) http://www.php-security.org/MOPB/MOPB-44-2007.html

Deep Links:
Links available to Secunia VIM customers

Do you have additional information related to this advisory?

Please provide information about patches, mitigating factors, new versions, exploits, faulty patches, links, and other relevant data by posting comments to this Advisory. You can also send this information to vuln@secunia.com

Subject: PHP Multiple Vulnerabilities

No posts yet

-

You must be logged in to post a comment.



 Products Solutions Customers Partner Resources Company
 
 Corporate
Vulnerability Intelligence Manager (VIM)
Corporate Software Inspector (CSI)
Consumer
Personal Software Inspector (PSI)
Online Software Inspector (OSI)
 Industry
Compliance
Technology
Integration
 Customers
Testimonials
 VARS
MSSP
Technology Partners
References
 Factsheets
Reports
Webinars
Events
 About us
Careers
Memberships
Newsroom


 
© 2002-2014 Secunia ApS - Rued Langgaards Vej 8, 4th floor, DK-2300 Copenhagen, Denmark - +45 7020 5144
Terms & Conditions and Copyright - Privacy - Report Vulnerability