PHP Session Handling Double Free Vulnerabilities
Secunia Advisory: SA24505
Release Date: 2007-03-15
Last Update: 2007-05-04
Popularity: 10,773 views

Critical:
Less critical
Impact: System access
Where: Local system
Solution Status: Partial Fix

Software:PHP 4.4.x
PHP 5.0.x
PHP 5.1.x
PHP 5.2.x

Subscribe: Instant alerts on relevant vulnerabilities

CVE reference:CVE-2007-1521
CVE-2007-1522


Description:
Stefan Esser has reported some vulnerabilities in PHP, which can be exploited by malicious users to compromise a vulnerable system.

1) A double free error within the "session_regenerate_id()" function can be exploited to execute arbitrary code with the privileges of the PHP interpreter.

2) A double free error within the handling of rejected sessions in PHP's internal storage module can be exploited to execute arbitrary code with the privileges of the PHP interpreter.

Successful exploitation requires that a user can e.g. upload and execute malicious PHP scripts. Remote exploitation may be possible, but has not currently been proven.

The vulnerabilities are reported in version 5.2.0 and 5.2.1, vulnerability #1 potentially also affects version 4.x. Other versions may also be affected.

Solution:
Update to version 5.2.2 or 4.4.7 to fix vulnerability #1. Allow only trusted users to upload and execute PHP scripts.

Provided and/or discovered by:
Stefan Esser

Changelog:
2007-03-26: Added CVE reference.
2007-05-03: Updated "Solution" and "Description" section. Added vulnerable version 4.x.

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

MOPB:
http://www.php-security.org/MOPB/MOPB-22-2007.html
http://www.php-security.org/MOPB/MOPB-23-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. Subdreamer Light Global Variables SQL Injection Vulnerability // 69 views
2. Adobe Flash Player Multiple Vulnerabilities // 41 views
3. Microsoft Office Two Code Execution Vulnerabilities // 22 views
4. Microsoft Word Malformed Object Pointer Vulnerability // 18 views
5. VLC Media Player Multiple Vulnerabilities // 17 views
6. Sun Java System Web Proxy Server SOCKS Module Buffer Overflows // 16 views
7. Opera Multiple Vulnerabilities // 16 views
8. phpBB "cur_password" Cross-Site Scripting Vulnerability // 14 views
9. Sun Java JDK / JRE Multiple Vulnerabilities // 14 views
10. Netgear WN802T Wireless Access Point Two Vulnerabilities // 13 views