Secunia Logo
Netsikker nu! 2008
 
PHP4 ZVAL Reference Counter Overflow and Cross-Site Scripting
Secunia Advisory: SA24356
Release Date: 2007-03-05
Last Update: 2007-05-04
Popularity: 8,282 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

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. phpBB reveals user IPs // 100 views
2. phpBB Avatar Functions Information Disclosure and Deletion // 90 views
3. phpBB Avatar Script Insertion Vulnerability // 81 views
4. phpBB "url" bbcode Script Insertion Vulnerability // 45 views
5. phpBB Cross Site Scripting and Unspecified Vulnerabilities // 44 views
6. phpBB BBcode "url" Script Insertion Vulnerability // 42 views
7. phpBB "gen_rand_string()" Predictable RNG Weakness // 34 views
8. Zeroboard ".htaccess" File Upload Vulnerability // 32 views
9. CA ARCserve Backup Multiple Vulnerabilities // 29 views
10. ScriptsEz Easy Image Downloader "id" File Disclosure Vulnerability // 28 views