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: SA26642  
Release Date: 2007-08-31
Last Update: 2007-09-06

Critical:
Moderately critical
Impact: Unknown
Security Bypass
Where: From remote
Solution Status: Vendor Patch

Software:PHP 5.2.x

CVE reference:CVE-2007-3996 (Secunia mirror)
CVE-2007-3378 (Secunia mirror)
CVE-2007-3997 (Secunia mirror)
CVE-2007-4652 (Secunia mirror)
CVE-2007-4658 (Secunia mirror)
CVE-2007-4659 (Secunia mirror)
CVE-2007-4670 (Secunia mirror)
CVE-2007-4657 (Secunia mirror)
CVE-2007-4662 (Secunia mirror)
CVE-2007-3998 (Secunia mirror)

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


Description:
Some vulnerabilities have been reported in PHP, where some have unknown impacts and others can be exploited by malicious users to bypass certain security restrictions.

1) An error with unknown impact exists within the "money_format()" function when processing "%i" and "%n" tokens.

2) An unspecified error exists within the "zend_alter_ini_entry()" function. This can be exploited to trigger a memory_limit interruption.

3) Two integer overflow errors exist within the "gdImageCreate()" and "gdImageCreateTrueColor()" functions in ext/gd/libgd/gd.c. These can be exploited to cause a heap-based buffer overflow via overly large integer values passed as parameters to e.g. the "imagecreatetruecolor()" PHP function.

4) Two integer overflow errors exist within the "gdImageCopyResized()" function in ext/gd/libgd/gd.c. These can be exploited to cause a heap-based buffer overflow via overly large integer values passed as parameters to the "imagecopyresized()" or "imagecopyresampled()" PHP functions.

Successful exploitation of vulnerabilities #3 and #4 may allow execution of arbitrary code, which may lead to security restrictions (e.g. the "disable_functions" directive) being bypassed, but requires that PHP is configured to use gd.

5) An error exists within the handling of SQL queries containing "LOCAL INFILE" inside the MySQL and MySQLi extensions. This can be exploited to bypass the "open_basedir" and "safe_mode" directives.

6) An error exists when processing "session_save_path()" and "ini_set()" functions called from a ".htaccess" file. This can be exploited to bypass the "open_basedir" and "safe_mode" directives.

7) An unspecified error exists within the "glob()" function. This can be exploited to bypass the "open_basedir" directive.

8) An unspecified error exists within the session extension. This can potentially be exploited to bypass the "open_basedir" directive when the session file is a symlink.

The vulnerabilities are reported in PHP versions prior to 5.2.4.

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 PHP version 5.2.4.
http://www.php.net/downloads.php

Provided and/or discovered by:
1) The vendor credits Stanislav Malyshev.
2) The vendor credits Stefan Esser.
3, 4) Mattias Bengtsson and Philip Olausson.
5) The vendor credits Stanislav Malyshev. Also reported by Mattias Bengtsson and Philip Olausson.
6) The vendor credits Maksymilian Arciemowicz.
7) The vendor credits dr.
8) The vendor credits c.i.morris.

Changelog:
2007-09-06: Added CVE reference.

Original Advisory:
http://www.php.net/releases/5_2_4.php

3) http://secweb.se/en/advisories/php-imagecreatetruecolor-integer-overflow/
4) http://secweb.se/en/advisories/php-imagecopyresized-integer-overflow/
5) http://secweb.se/en/advisories/php-mysql-safe-mode-bypass-vulnerability/



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.

18 Related Secunia Security Advisories, displaying 10

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

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.
Linux Kernel LDT Buffer Size Handling Vulnerability
4.
Red Hat update for kernel
5.
dnsmasq Denial of Service and DNS Cache Poisoning
6.
Apple Safari Cross-Domain Cookie Injection Vulnerability
7.
YouTube Blog Multiple Vulnerabilities
8.
Debian update for clamav
9.
Red Hat update for thunderbird
10.
Ubuntu update for php





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