Secunia Logo  
 
PHP4 ZVAL Reference Counter Overflow and Cross-Site Scripting
Secunia Advisory: SA24356
Release Date: 2007-03-05
Last Update: 2007-05-04
Popularity: 8,822 views

Critical:
Less critical
Impact: Security Bypass
Cross Site Scripting
Where: Local system
Solution Status: Partial Fix

Software:PHP 4.4.x

Subscribe: Instant alerts on relevant vulnerabilities

CVE reference:CVE-2007-1287


Description:
Stefan Esser has discovered some vulnerabilities in PHP4, which can be exploited by malicious, local users to bypass certain security restrictions, and by malicious people to conduct cross-site scripting attacks.

1) The vulnerability is caused due to an integer overflow in the handling of ZVAL structures. This can be exploited to corrupt memory and execute arbitrary code therefore bypassing security restrictions like the "disable_functions" directive.

The vulnerability is confirmed in version 4.4.6. Other versions may also be affected.

2) Input passed via array parameters is not properly sanitised before being returned to the user within a "phpinfo()" call. This can be exploited to execute arbitrary HTML and script code in a user's browser session in context of an affected site via a script calling "phpinfo()".

This is related to:
SA17371 (vulnerability #3)
SA19599 (vulnerability #1)

The vulnerability is confirmed in version 4.4.6 and also reported in versions 4.4.3 through 4.4.6. Other versions may also be affected.

Solution:
Update to version 4.4.7 to fix vulnerability #2. Grant only trusted users access to affected systems. PHP scripts calling "phpinfo()" should not be publicly accessible on production systems.

Provided and/or discovered by:
Stefan Esser

Changelog:
2007-03-05: Updated "Description" section. Added information about phpinfo() vulnerability.
2007-03-09: Added CVE reference.
2007-05-04: Updated "Solution" section.

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

MOPB:
1) http://www.php-security.org/MOPB/MOPB-01-2007.html
2) http://www.php-security.org/MOPB/MOPB-08-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

Today
New advisories: 8
New vulnerabilities: 20
Updated advisories: 12

Less // 178 views
Red Hat update for kernel
Less // 174 views
Ubuntu update for bind9
Less // 165 views
Ubuntu update for ntp
Less // 173 views
Red Hat update for bind

8th Jan, 2009
New advisories: 24
New vulnerabilities: 99
Updated advisories: 26


Solutions | More...  


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. CuteNews Cross-Site Scripting and PHP Code Execution Vulnerabilities // 72 views
2. XOOPS "mydirname" PHP Code Injection Vulnerability // 67 views
3. Ubuntu update for ntp // 45 views
4. Ubuntu update for bind9 // 38 views
5. Red Hat update for bind // 38 views
6. Serv-U Denial of Service Vulnerability // 36 views
7. Sun Solaris Samba "smbd" Information Disclosure Vulnerability // 35 views
8. Red Hat update for kernel // 34 views
9. Sun Java JDK / JRE Multiple Vulnerabilities // 28 views
10. Adobe Flash Player Multiple Security Issues and Vulnerabilities // 28 views