PHP: Format string and XSS vulnerabilities

Security Team  Contact Address

Updated March 22, 2006

1.  Gentoo Linux Security Advisory

Version Information

Advisory Reference GLSA 200603-22 / php
Release Date March 22, 2006
Latest Revision March 22, 2006: 01
Impact normal
Exploitable remote
Package Vulnerable versions Unaffected versions Architecture(s)
dev-lang/php < 4.4.2, revision >= 5.1.1, revision >= 5.0.5, revision >= 5.0.4 >= 5.1.2 All supported architectures

Related bugreports: #125878

Synopsis

Multiple vulnerabilities in PHP allow remote attackers to inject arbitrary HTTP headers, perform cross site scripting or in some cases execute arbitrary code.

2.  Impact Information

Background

PHP is a general-purpose scripting language widely used to develop web-based applications. It can run on a web server with the mod_php module or the CGI version and also stand-alone in a CLI.

Description

Stefan Esser of the Hardened PHP project has reported a few vulnerabilities found in PHP:

Impact

By sending a specially crafted request, a remote attacker can exploit this vulnerability to inject arbitrary HTTP headers, which will be included in the response sent to the user. The format string vulnerability may be exploited to execute arbitrary code.

3.  Resolution Information

Workaround

There is no known workaround at this time.

Resolution

All PHP 5.x users should upgrade to the latest version:

Code Listing 3.1: Resolution

# emerge --sync
# emerge --ask --oneshot --verbose ">=dev-lang/php-5.1.2"

All PHP 4.x users should upgrade to the latest version:

Code Listing 3.2: Resolution

# emerge --sync
# emerge --ask --oneshot --verbose ">=dev-lang/php-4.4.2"

4.  References