PHP Remote Arbitrary Location File Upload Vulnerability
BID:11190
Info
PHP Remote Arbitrary Location File Upload Vulnerability
| Bugtraq ID: | 11190 |
| Class: | Input Validation Error |
| CVE: |
CVE-2004-0959 |
| 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 Remote Arbitrary Location File Upload Vulnerability
Reportedly PHP is vulnerable to an arbitrary location file upload vulnerability. This issue is due to a failure of the PHP application to properly sanitize user-supplied file name input.
An attacker may exploit this issue to upload files to an arbitrary location on a computer running the affected software. This may facilitate arbitrary server-side script code execution as well as other attacks.
It is reported that this issue only affects PHP versions 4.2.0 and subsequent.
Reportedly PHP is vulnerable to an arbitrary location file upload vulnerability. This issue is due to a failure of the PHP application to properly sanitize user-supplied file name input.
An attacker may exploit this issue to upload files to an arbitrary location on a computer running the affected software. This may facilitate arbitrary server-side script code execution as well as other attacks.
It is reported that this issue only affects PHP versions 4.2.0 and subsequent.
Exploit / POC
PHP Remote Arbitrary Location File Upload Vulnerability
No exploit is required to leverage this issue.
No exploit is required to leverage this issue.
Solution / Fix
PHP Remote Arbitrary Location File Upload 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 Remote Arbitrary Location File Upload Vulnerability
References:
References:
- PHP 5.0.2 Changelog (PHP)
- RHSA-2004:687-05 - Updated php packages fix security issues and bugs (RedHat)
- Php RFC1867 Upload Vuln. POC Released (Stefano Di Paola
) - Php Vulnerability N. 2 (Stefano Di Paola
) - cvs: php-src(PHP_5_2) /ext/standard html.c (Ilia Alshanetsky)