Secunia Logo
Netsikker nu! 2008
 
PHP Multiple Code Execution Vulnerabilities
Secunia Advisory: SA24542
Release Date: 2007-03-16
Last Update: 2007-05-04
Popularity: 10,882 views

Critical:
Less critical
Impact: Exposure of sensitive information
Privilege escalation
Where: Local system
Solution Status: Partial Fix

Software:PHP 4.4.x
PHP 5.2.x

Subscribe: Instant alerts on relevant vulnerabilities

CVE reference:CVE-2007-1484
CVE-2007-1581
CVE-2007-1582
CVE-2007-1883


Description:
Stefan Esser has discovered some vulnerabilities and a weakness in PHP, which can be exploited by malicious users to disclose potentially sensitive information or to gain escalated privileges.

1) An error in the "array_user_key_compare()" function where key references are incorrectly destroyed can be exploited to cause memory corruption.

2) An error in the handling of resource data can be exploited to destroy and replace certain resources by interrupting the processing PHP function (e.g. functions of the GD extension). This allows read and write access to arbitrary memory addresses.

Successful exploitation of these vulnerabilities allows execution of arbitrary code, which can lead to security restrictions, such as the "disable_functions" directive, being bypassed.

3) An error in the handling of references in functions can be exploited to read arbitrary heap memory via a user space error handler interrupting e.g. the "iptcembed()" function.

The vulnerabilities are confirmed in version 5.2.1 and also reported in version 4.4.6. Other versions may also be affected.

Solution:
Update to version 5.2.2 or 4.4.7 to fix vulnerability #1. Grant only trusted users permissions to execute PHP code.

Provided and/or discovered by:
Stefan Esser

Changelog:
2007-03-20: Updated "Description" section and "Title". Added vulnerability #2.
2007-03-21: Added link to "Original Advisory" section.
2007-03-21: Added CVE reference.
2007-03-26: Added CVE reference.
2007-03-30: Updated "Description" section. Added weakness #3.
2007-04-12: Added CVE reference.
2007-05-04: Updated "Solution" section.

Original Advisory:
PHP:
http://www.php.net/releases/5_2_2.php
http://www.php.net/releases/4_4_7.php

MOPB:
1) http://www.php-security.org/MOPB/MOPB-24-2007.html

2) http://www.php-security.org/MOPB/MOPB-27-2007.html
http://www.php-security.org/MOPB/MOPB-28-2007.html

3) http://www.php-security.org/MOPB/MOPB-37-2007.html


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

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. Trend Micro ServerProtect Multiple Buffer Overflow Vulnerabilities // 37 views
2. FUJITSU Interstage Products Apache Tomcat Security Bypass // 28 views
3. CA ARCserve Backup Multiple Vulnerabilities // 28 views
4. Sun Java System Web Proxy Server FTP Subsystem Buffer Overflow // 28 views
5. Subdreamer Light Global Variables SQL Injection Vulnerability // 25 views
6. Apple Mac OS X Security Update Fixes Multiple Vulnerabilities // 23 views
7. Built2go Real Estate Listings "event_id" SQL Injection // 22 views
8. VirtueMart Joomla! eCommerce Edition Multiple Vulnerabilities // 21 views
9. DFF PHP Framework API "DFF_config[dir_include]" File Inclusion Vulnerabilities // 21 views
10. Red Hat update for cups // 21 views