Secunia - Stay Secure
Gartner
Home Corporate Website Jobs Updated Mailing Lists RSS Blog  Online Shop Advertise
Software Inspectors
  Scan Online
  Personal (PSI)
  Network (NSI 2.0)

Solutions For
  Security Professionals
  Security Vendors

Free Solutions For
  Open Communities
  Journalists & Media

Secunia Advisories
  Search
  Historic Advisories
  Listed By Product
  Listed By Vendor
  Statistics / Graphs
  Secunia Research
  Report Vulnerability
  About Advisories

Virus Information
  Chronological List
  Last 10 Virus Alerts
  About Virus Information

Secunia Customers
  Customer Area


PHP Multiple Vulnerabilities Advisory Available in Danish  Advisory Available in German 

Secunia Advisory: SA24089  
Release Date: 2007-02-09
Last Update: 2007-04-12

Critical:
Moderately critical
Impact: Unknown
Security Bypass
Exposure of sensitive information
DoS
System access
Where: From remote
Solution Status: Vendor Patch

Software:PHP 4.4.x
PHP 5.2.x

CVE reference:CVE-2007-0905 (Secunia mirror)
CVE-2007-0906 (Secunia mirror)
CVE-2007-0907 (Secunia mirror)
CVE-2007-0908 (Secunia mirror)
CVE-2007-0909 (Secunia mirror)
CVE-2007-0910 (Secunia mirror)
CVE-2007-0988 (Secunia mirror)
CVE-2007-1286 (Secunia mirror)
CVE-2007-1375 (Secunia mirror)
CVE-2007-1380 (Secunia mirror)
CVE-2007-1383 (Secunia mirror)
CVE-2007-1376 (Secunia mirror)
CVE-2007-1452 (Secunia mirror)
CVE-2007-1453 (Secunia mirror)
CVE-2007-1454 (Secunia mirror)
CVE-2007-1824 (Secunia mirror)
CVE-2007-1825 (Secunia mirror)
CVE-2007-1884 (Secunia mirror)
CVE-2007-1887 (Secunia mirror)
CVE-2007-1888 (Secunia mirror)
CVE-2007-1889 (Secunia mirror)
CVE-2007-1890 (Secunia mirror)

Want to know the next time vulnerabilities are fixed in this product?
- Companies can be alerted via email and SMS!


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.

Do you have this product installed on your home computer? Scan using the free Personal Software Inspector. Check if a vulnerable version is installed on computers in your corporate network, scan using the Network Software Inspector.

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

Changelog:
2007-02-14: Added CVE reference.
2007-02-15: Updated "Solution" section. Added Information about PHP 4.
2007-02-20: Added CVE reference. Updated advisory with new information. Added vulnerabilities #10 and #11.
2007-03-05: Added vulnerabilities #12 and #13. Updated vulnerability #6.
2007-03-08: Added vulnerability #14.
2007-03-09: Added vulnerability #15. Added CVE reference.
2007-03-12: Added vulnerabilities #16, #17, and #18.
2007-03-14: Added CVE reference.
2007-03-19: Added vulnerability #19.
2007-03-21: Added CVE reference.
2007-03-26: Added vulnerability #20 and #21.
2007-03-28: Added vulnerability #22.
2007-04-02: Added vulnerability #23, #24, and #25. Updated Description. Added information for vulnerability #5, #7 and #10 provided by Stefan Esser. Added links to "Original Advisory" section.
2007-04-03: Added CVE reference.
2007-04-12: Added CVE reference.

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



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.

37 Related Secunia Security Advisories, displaying 10

1. PHP Multiple Vulnerabilities
2. PHP Multiple Vulnerabilities
3. PHP Multiple Vulnerabilities
4. PHP COM Objects Security Bypass
5. PHP Multiple Vulnerabilities
6. PHP "glob()" Code Execution Vulnerability
7. PHP Multiple Extensions Buffer Overflow Vulnerabilities
8. PHP Integer Overflow Vulnerability and Security Bypass
9. PHP crypt() Race Condition Vulnerability
10. PHP "gdPngReadData()" Truncated PNG Data Denial of Service

Show all related advisories


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.








Secunia PSI
Scan | Patch | Track
Free Download

Secunia Poll

Do you think it's important to read Setup/User Guides for applications for use within your network?


See Results   


Most Popular Advisories

1.
OpenBSD BIND Query Port DNS Cache Poisoning
2.
Drupal Session Fixation Vulnerability
3.
Debian update for clamav
4.
Apple Safari Cross-Domain Cookie Injection Vulnerability
5.
Linux Kernel LDT Buffer Size Handling Vulnerability
6.
Debian update for xulrunner
7.
IPCop update for perl
8.
Red Hat update for thunderbird
9.
Microsoft Word Unspecified Code Execution Vulnerability
10.
dnsmasq Denial of Service and DNS Cache Poisoning





Vulnerability Management - Terms & Conditions - Copyright 2002-2008 Secunia - Compliance - Contact Secunia