PHP PHP_Variables Remote Memory Disclosure Vulnerability
BID:11334
Info
PHP PHP_Variables Remote Memory Disclosure Vulnerability
| Bugtraq ID: | 11334 |
| Class: | Failure to Handle Exceptional Conditions |
| CVE: |
CVE-2004-0958 |
| Remote: | Yes |
| Local: | No |
| Published: | Sep 15 2004 12:00AM |
| Updated: | Jul 12 2009 07:06AM |
| Credit: | Discovery of this issue is credited to Stefano Di Paola <[email protected]>. |
| Vulnerable: |
SGI ProPack 3.0 Redhat Linux 9.0 i386 Redhat Linux 7.3 i386 Redhat Fedora Core1 PHP PHP 5.0.1 PHP PHP 5.0 .0 PHP PHP 4.3.8 PHP PHP 4.3.7 PHP PHP 4.3.6 PHP PHP 4.3.5 PHP PHP 4.3.4 PHP PHP 4.3.3 PHP PHP 4.3.2 PHP PHP 4.3.1 PHP PHP 4.3 PHP PHP 4.2.3 PHP PHP 4.2.2 PHP PHP 4.2.1 PHP PHP 4.2 .0 PHP PHP 4.1.2 PHP PHP 4.1.1 PHP PHP 4.1 .0 PHP PHP 4.0.7 PHP PHP 4.0.6 PHP PHP 4.0.5 PHP PHP 4.0.4 PHP PHP 4.0.3 PHP PHP 4.0.2 PHP PHP 4.0.1 PHP PHP 4.0 0 Gentoo Linux 1.4 _rc3 Gentoo Linux 1.4 _rc2 Gentoo Linux 1.4 _rc1 Gentoo Linux 1.4 Gentoo Linux 1.2 Gentoo Linux 1.1 a Gentoo Linux 0.7 Gentoo Linux 0.5 |
| Not Vulnerable: |
PHP PHP 5.0.2 |
Discussion
PHP PHP_Variables Remote Memory Disclosure Vulnerability
A vulnerability is reported to present itself in the array parsing functions of the 'php_variables.c' PHP source file.
The vulnerability occurs when a PHP script is being used to print URI parameters or data, that are supplied by a third party, into a dynamically generated web page. It is reported that the vulnerable function does not strip certain characters from the user supplied data, this may ultimately be harnessed to manipulate the parsing function into returning regions of process memory to the attacker.
It is reported that this issue only affects PHP versions 4.2.0 and subsequent.
A vulnerability is reported to present itself in the array parsing functions of the 'php_variables.c' PHP source file.
The vulnerability occurs when a PHP script is being used to print URI parameters or data, that are supplied by a third party, into a dynamically generated web page. It is reported that the vulnerable function does not strip certain characters from the user supplied data, this may ultimately be harnessed to manipulate the parsing function into returning regions of process memory to the attacker.
It is reported that this issue only affects PHP versions 4.2.0 and subsequent.
Exploit / POC
PHP PHP_Variables Remote Memory Disclosure Vulnerability
The following example is available:
$ curl "http://www.example.com/phpinfo.php" -d `perl -e 'print
"f"x100;print "[g][=1"'`
where phpinfo.php is:
<?
phpinfo();
?>
or some php file containing print_r function:
<?
print_r($_REQUEST);
?>
The following example is available:
$ curl "http://www.example.com/phpinfo.php" -d `perl -e 'print
"f"x100;print "[g][=1"'`
where phpinfo.php is:
<?
phpinfo();
?>
or some php file containing print_r function:
<?
print_r($_REQUEST);
?>
Solution / Fix
PHP PHP_Variables Remote Memory Disclosure Vulnerability
Solution:
The vendor has released an upgrade dealing with this issue.
Gentoo Linux has released an advisory (GLSA 200410-04) and an updated eBuild to address this vulnerability. Gentoo users are advised to run the following commands to apply the updates:
emerge sync
emerge -pv ">=dev-php/php-4.3.9"
emerge ">=dev-php/php-4.3.9"
emerge -pv ">=dev-php/mod_php-4.3.9"
emerge ">=dev-php/mod_php-4.3.9"
emerge -pv ">=dev-php/php-cgi-4.3.9"
emerge ">=dev-php/php-cgi-4.3.9"
Red Hat has released Red Hat Enterprise Linux advisory RHSA-2004:687-05 to address various issues in PHP. Please see the advisory in Web references for more information.
Fedora has released advisories FEDORA-2004-567 and FEDORA-2004-568 to address various PHP issues in Fedora Core 2 and Fedora Core 3. Please see the referenced advisories for more information.
SGI has released advisory 20050101-01-U to address various issues in SGI Advanced Linux Environment 3. This advisory includes updated SGI ProPack 3 Service Pack 3 packages. Please see the referenced advisory for more information.
Fedora has released Fedora Legacy advisory FLSA:2344 to address various issues in Red Hat Linux 7.3, Red Hat Linux 9.0 and Fedora Core 1 for the i386 architecture. Please see the referenced advisory for more information.
SGI ProPack 3.0
PHP PHP 4.0 0
PHP PHP 4.0.1
PHP PHP 4.0.2
PHP PHP 4.0.3
PHP PHP 4.0.4
PHP PHP 4.0.5
PHP PHP 4.0.6
PHP PHP 4.0.7
PHP PHP 4.1 .0
PHP PHP 4.1.1
PHP PHP 4.1.2
PHP PHP 4.2 .0
PHP PHP 4.2.1
PHP PHP 4.2.2
PHP PHP 4.2.3
PHP PHP 4.3
PHP PHP 4.3.1
PHP PHP 4.3.2
PHP PHP 4.3.3
PHP PHP 4.3.4
PHP PHP 4.3.5
PHP PHP 4.3.6
PHP PHP 4.3.7
PHP PHP 4.3.8
PHP PHP 5.0 .0
PHP PHP 5.0.1
Solution:
The vendor has released an upgrade dealing with this issue.
Gentoo Linux has released an advisory (GLSA 200410-04) and an updated eBuild to address this vulnerability. Gentoo users are advised to run the following commands to apply the updates:
emerge sync
emerge -pv ">=dev-php/php-4.3.9"
emerge ">=dev-php/php-4.3.9"
emerge -pv ">=dev-php/mod_php-4.3.9"
emerge ">=dev-php/mod_php-4.3.9"
emerge -pv ">=dev-php/php-cgi-4.3.9"
emerge ">=dev-php/php-cgi-4.3.9"
Red Hat has released Red Hat Enterprise Linux advisory RHSA-2004:687-05 to address various issues in PHP. Please see the advisory in Web references for more information.
Fedora has released advisories FEDORA-2004-567 and FEDORA-2004-568 to address various PHP issues in Fedora Core 2 and Fedora Core 3. Please see the referenced advisories for more information.
SGI has released advisory 20050101-01-U to address various issues in SGI Advanced Linux Environment 3. This advisory includes updated SGI ProPack 3 Service Pack 3 packages. Please see the referenced advisory for more information.
Fedora has released Fedora Legacy advisory FLSA:2344 to address various issues in Red Hat Linux 7.3, Red Hat Linux 9.0 and Fedora Core 1 for the i386 architecture. Please see the referenced advisory for more information.
SGI ProPack 3.0
-
SGI patch10131.tar.gz
ftp://patches.sgi.com/support/free/security/patches/ProPack/3/patch101 31.tar.gz
PHP PHP 4.0 0
-
PHP PHP 5.0.2
http://www.php.net/downloads.php#v5
PHP PHP 4.0.1
-
PHP PHP 5.0.2
http://www.php.net/downloads.php#v5
PHP PHP 4.0.2
-
PHP PHP 5.0.2
http://www.php.net/downloads.php#v5
PHP PHP 4.0.3
-
PHP PHP 5.0.2
http://www.php.net/downloads.php#v5
PHP PHP 4.0.4
-
PHP PHP 5.0.2
http://www.php.net/downloads.php#v5
PHP PHP 4.0.5
-
PHP PHP 5.0.2
http://www.php.net/downloads.php#v5
PHP PHP 4.0.6
-
PHP PHP 5.0.2
http://www.php.net/downloads.php#v5
PHP PHP 4.0.7
-
PHP PHP 5.0.2
http://www.php.net/downloads.php#v5
PHP PHP 4.1 .0
-
PHP PHP 5.0.2
http://www.php.net/downloads.php#v5
PHP PHP 4.1.1
-
PHP PHP 5.0.2
http://www.php.net/downloads.php#v5
PHP PHP 4.1.2
-
PHP PHP 5.0.2
http://www.php.net/downloads.php#v5 -
RedHat php-4.1.2-7.3.14.legacy.i386.rpm
RedHat Linux 7.3
http://download.fedoralegacy.org/redhat/7.3/updates/i386/php-4.1.2-7.3 .14.legacy.i386.rpm -
RedHat php-devel-4.1.2-7.3.14.legacy.i386.rpm
RedHat Linux 7.3
http://download.fedoralegacy.org/redhat/7.3/updates/i386/php-devel-4.1 .2-7.3.14.legacy.i386.rpm -
RedHat php-imap-4.1.2-7.3.14.legacy.i386.rpm
RedHat Linux 7.3
http://download.fedoralegacy.org/redhat/7.3/updates/i386/php-imap-4.1. 2-7.3.14.legacy.i386.rpm -
RedHat php-ldap-4.1.2-7.3.14.legacy.i386.rpm
RedHat Linux 7.3
http://download.fedoralegacy.org/redhat/7.3/updates/i386/php-ldap-4.1. 2-7.3.14.legacy.i386.rpm -
RedHat php-manual-4.1.2-7.3.14.legacy.i386.rpm
RedHat Linux 7.3
http://download.fedoralegacy.org/redhat/7.3/updates/i386/php-manual-4. 1.2-7.3.14.legacy.i386.rpm -
RedHat php-mysql-4.1.2-7.3.14.legacy.i386.rpm
RedHat Linux 7.3
http://download.fedoralegacy.org/redhat/7.3/updates/i386/php-mysql-4.1 .2-7.3.14.legacy.i386.rpm -
RedHat php-odbc-4.1.2-7.3.14.legacy.i386.rpm
RedHat Linux 7.3
http://download.fedoralegacy.org/redhat/7.3/updates/i386/php-odbc-4.1. 2-7.3.14.legacy.i386.rpm -
RedHat php-pgsql-4.1.2-7.3.14.legacy.i386.rpm
RedHat Linux 7.3
http://download.fedoralegacy.org/redhat/7.3/updates/i386/php-pgsql-4.1 .2-7.3.14.legacy.i386.rpm -
RedHat php-snmp-4.1.2-7.3.14.legacy.i386.rpm
RedHat Linux 7.3
http://download.fedoralegacy.org/redhat/7.3/updates/i386/php-snmp-4.1. 2-7.3.14.legacy.i386.rpm
PHP PHP 4.2 .0
-
PHP PHP 5.0.2
http://www.php.net/downloads.php#v5
PHP PHP 4.2.1
-
PHP PHP 5.0.2
http://www.php.net/downloads.php#v5
PHP PHP 4.2.2
-
PHP PHP 5.0.2
http://www.php.net/downloads.php#v5 -
RedHat php-4.2.2-17.10.legacy.i386.rpm
RedHat Linux 9
http://download.fedoralegacy.org/redhat/9/updates/i386/php-4.2.2-17.10 .legacy.i386.rpm -
RedHat php-devel-4.2.2-17.10.legacy.i386.rpm
RedHat Linux 9
http://download.fedoralegacy.org/redhat/9/updates/i386/php-devel-4.2.2 -17.10.legacy.i386.rpm -
RedHat php-imap-4.2.2-17.10.legacy.i386.rpm
RedHat Linux 9
http://download.fedoralegacy.org/redhat/9/updates/i386/php-imap-4.2.2- 17.10.legacy.i386.rpm -
RedHat php-ldap-4.2.2-17.10.legacy.i386.rpm
RedHat Linux 9
http://download.fedoralegacy.org/redhat/9/updates/i386/php-ldap-4.2.2- 17.10.legacy.i386.rpm -
RedHat php-manual-4.2.2-17.10.legacy.i386.rpm
RedHat Linux 9
http://download.fedoralegacy.org/redhat/9/updates/i386/php-manual-4.2. 2-17.10.legacy.i386.rpm -
RedHat php-mysql-4.2.2-17.10.legacy.i386.rpm
RedHat Linux 9
http://download.fedoralegacy.org/redhat/9/updates/i386/php-mysql-4.2.2 -17.10.legacy.i386.rpm -
RedHat php-odbc-4.2.2-17.10.legacy.i386.rpm
RedHat Linux 9
http://download.fedoralegacy.org/redhat/9/updates/i386/php-odbc-4.2.2- 17.10.legacy.i386.rpm -
RedHat php-pgsql-4.2.2-17.10.legacy.i386.rpm
RedHat Linux 9
http://download.fedoralegacy.org/redhat/9/updates/i386/php-pgsql-4.2.2 -17.10.legacy.i386.rpm -
RedHat php-snmp-4.2.2-17.10.legacy.i386.rpm
RedHat Linux 9
http://download.fedoralegacy.org/redhat/9/updates/i386/php-snmp-4.2.2- 17.10.legacy.i386.rpm
PHP PHP 4.2.3
-
PHP PHP 5.0.2
http://www.php.net/downloads.php#v5
PHP PHP 4.3
-
PHP PHP 5.0.2
http://www.php.net/downloads.php#v5
PHP PHP 4.3.1
-
PHP PHP 5.0.2
http://www.php.net/downloads.php#v5
PHP PHP 4.3.2
-
PHP PHP 5.0.2
http://www.php.net/downloads.php#v5
PHP PHP 4.3.3
-
PHP PHP 5.0.2
http://www.php.net/downloads.php#v5 -
RedHat php-4.3.10-1.1.legacy.i386.rpm
RedHat Fedora Core 1
http://download.fedoralegacy.org/fedora/1/updates/i386/php-4.3.10-1.1. legacy.i386.rpm -
RedHat php-devel-4.3.10-1.1.legacy.i386.rpm
RedHat Fedora Core 1
http://download.fedoralegacy.org/fedora/1/updates/i386/php-devel-4.3.1 0-1.1.legacy.i386.rpm -
RedHat php-domxml-4.3.10-1.1.legacy.i386.rpm
RedHat Fedora Core 1
http://download.fedoralegacy.org/fedora/1/updates/i386/php-domxml-4.3. 10-1.1.legacy.i386.rpm -
RedHat php-imap-4.3.10-1.1.legacy.i386.rpm
RedHat Fedora Core 1
http://download.fedoralegacy.org/fedora/1/updates/i386/php-imap-4.3.10 -1.1.legacy.i386.rpm -
RedHat php-ldap-4.3.10-1.1.legacy.i386.rpm
RedHat Fedora Core 1
http://download.fedoralegacy.org/fedora/1/updates/i386/php-ldap-4.3.10 -1.1.legacy.i386.rpm -
RedHat php-mbstring-4.3.10-1.1.legacy.i386.rpm
RedHat Fedora Core 1
http://download.fedoralegacy.org/fedora/1/updates/i386/php-mbstring-4. 3.10-1.1.legacy.i386.rpm -
RedHat php-mysql-4.3.10-1.1.legacy.i386.rpm
RedHat Fedora Core 1
http://download.fedoralegacy.org/fedora/1/updates/i386/php-mysql-4.3.1 0-1.1.legacy.i386.rpm -
RedHat php-odbc-4.3.10-1.1.legacy.i386.rpm
RedHat Fedora Core 1
http://download.fedoralegacy.org/fedora/1/updates/i386/php-odbc-4.3.10 -1.1.legacy.i386.rpm -
RedHat php-pgsql-4.3.10-1.1.legacy.i386.rpm
RedHat Fedora Core 1
http://download.fedoralegacy.org/fedora/1/updates/i386/php-pgsql-4.3.1 0-1.1.legacy.i386.rpm -
RedHat php-snmp-4.3.10-1.1.legacy.i386.rpm
RedHat Fedora Core 1
http://download.fedoralegacy.org/fedora/1/updates/i386/php-snmp-4.3.10 -1.1.legacy.i386.rpm -
RedHat php-xmlrpc-4.3.10-1.1.legacy.i386.rpm
RedHat Fedora Core 1
http://download.fedoralegacy.org/fedora/1/updates/i386/php-xmlrpc-4.3. 10-1.1.legacy.i386.rpm
PHP PHP 4.3.4
-
Fedora php-4.3.8-2.1.i386.rpm
RedHat Fedora Core 2
http://download.fedora.redhat.com/pub/fedora/linux/core/updates/2/ -
Fedora php-4.3.8-2.1.x86_64.rpm
RedHat Fedora Core 2
http://download.fedora.redhat.com/pub/fedora/linux/core/updates/2/ -
Fedora php-debuginfo-4.3.8-2.1.i386.rpm
RedHat Fedora Core 2
http://download.fedora.redhat.com/pub/fedora/linux/core/updates/2/ -
Fedora php-debuginfo-4.3.8-2.1.x86_64.rpm
RedHat Fedora Core 2
http://download.fedora.redhat.com/pub/fedora/linux/core/updates/2/ -
Fedora php-devel-4.3.8-2.1.i386.rpm
RedHat Fedora Core 2
http://download.fedora.redhat.com/pub/fedora/linux/core/updates/2/ -
Fedora php-devel-4.3.8-2.1.x86_64.rpm
RedHat Fedora Core 2
http://download.fedora.redhat.com/pub/fedora/linux/core/updates/2/ -
Fedora php-domxml-4.3.8-2.1.i386.rpm
RedHat Fedora Core 2
http://download.fedora.redhat.com/pub/fedora/linux/core/updates/2/ -
Fedora php-domxml-4.3.8-2.1.x86_64.rpm
RedHat Fedora Core 2
http://download.fedora.redhat.com/pub/fedora/linux/core/updates/2/ -
Fedora php-imap-4.3.8-2.1.i386.rpm
RedHat Fedora Core 2
http://download.fedora.redhat.com/pub/fedora/linux/core/updates/2/ -
Fedora php-imap-4.3.8-2.1.x86_64.rpm
RedHat Fedora Core 2
http://download.fedora.redhat.com/pub/fedora/linux/core/updates/2/ -
Fedora php-ldap-4.3.8-2.1.i386.rpm
RedHat Fedora Core 2
http://download.fedora.redhat.com/pub/fedora/linux/core/updates/2/ -
Fedora php-ldap-4.3.8-2.1.x86_64.rpm
RedHat Fedora Core 2
http://download.fedora.redhat.com/pub/fedora/linux/core/updates/2/ -
Fedora php-mbstring-4.3.8-2.1.i386.rpm
RedHat Fedora Core 2
http://download.fedora.redhat.com/pub/fedora/linux/core/updates/2/ -
Fedora php-mbstring-4.3.8-2.1.x86_64.rpm
RedHat Fedora Core 2
http://download.fedora.redhat.com/pub/fedora/linux/core/updates/2/ -
Fedora php-mysql-4.3.8-2.1.i386.rpm
RedHat Fedora Core 2
http://download.fedora.redhat.com/pub/fedora/linux/core/updates/2/ -
Fedora php-mysql-4.3.8-2.1.x86_64.rpm
RedHat Fedora Core 2
http://download.fedora.redhat.com/pub/fedora/linux/core/updates/2/ -
Fedora php-odbc-4.3.8-2.1.i386.rpm
RedHat Fedora Core 2
http://download.fedora.redhat.com/pub/fedora/linux/core/updates/2/ -
Fedora php-odbc-4.3.8-2.1.x86_64.rpm
RedHat Fedora Core 2
http://download.fedora.redhat.com/pub/fedora/linux/core/updates/2/ -
Fedora php-pear-4.3.8-2.1.i386.rpm
RedHat Fedora Core 2
http://download.fedora.redhat.com/pub/fedora/linux/core/updates/2/ -
Fedora php-pear-4.3.8-2.1.x86_64.rpm
RedHat Fedora Core 2
http://download.fedora.redhat.com/pub/fedora/linux/core/updates/2/ -
Fedora php-pgsql-4.3.8-2.1.i386.rpm
RedHat Fedora Core 2
http://download.fedora.redhat.com/pub/fedora/linux/core/updates/2/ -
Fedora php-pgsql-4.3.8-2.1.x86_64.rpm
RedHat Fedora Core 2
http://download.fedora.redhat.com/pub/fedora/linux/core/updates/2/ -
Fedora php-snmp-4.3.8-2.1.i386.rpm
RedHat Fedora Core 2
http://download.fedora.redhat.com/pub/fedora/linux/core/updates/2/ -
Fedora php-snmp-4.3.8-2.1.x86_64.rpm
RedHat Fedora Core 2
http://download.fedora.redhat.com/pub/fedora/linux/core/updates/2/ -
Fedora php-xmlrpc-4.3.8-2.1.i386.rpm
RedHat Fedora Core 2
http://download.fedora.redhat.com/pub/fedora/linux/core/updates/2/ -
Fedora php-xmlrpc-4.3.8-2.1.x86_64.rpm
RedHat Fedora Core 2
http://download.fedora.redhat.com/pub/fedora/linux/core/updates/2/ -
PHP PHP 5.0.2
http://www.php.net/downloads.php#v5
PHP PHP 4.3.5
-
PHP PHP 5.0.2
http://www.php.net/downloads.php#v5
PHP PHP 4.3.6
-
PHP PHP 5.0.2
http://www.php.net/downloads.php#v5
PHP PHP 4.3.7
-
PHP PHP 5.0.2
http://www.php.net/downloads.php#v5
PHP PHP 4.3.8
-
PHP PHP 5.0.2
http://www.php.net/downloads.php#v5
PHP PHP 5.0 .0
-
PHP PHP 5.0.2
http://www.php.net/downloads.php#v5
PHP PHP 5.0.1
-
PHP PHP 5.0.2
http://www.php.net/downloads.php#v5
References
PHP PHP_Variables Remote Memory Disclosure Vulnerability
References:
References:
- PHP 5.0.2 Changelog (PHP)
- RHSA-2004:687-05 - Updated php packages fix security issues and bugs (RedHat)
- PHP Vulnerability N. 1 (Stefano Di Paola
) - cvs: php-src(PHP_5_2) /ext/standard html.c (Ilia Alshanetsky)