[UNIX] PHP4 phpinfo() XSS Vulnerability (Reintroduced)
- From: SecuriTeam <support@xxxxxxxxxxxxxx>
- Date: 5 Mar 2007 18:08:38 +0200
The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com
- - promotion
The SecuriTeam alerts list - Free, Accurate, Independent.
Get your security news from a reliable source.
http://www.securiteam.com/mailinglist.html
- - - - - - - - -
PHP4 phpinfo() XSS Vulnerability (Reintroduced)
------------------------------------------------------------------------
SUMMARY
The phpinfo() function "gives detailed information about the current
environment of PHP. This includes a dump of the request variables that
were sent".
With PHP 4.4.3 a previously fixed bug that was disclosed at the end of
October 2005 by the Hardened-PHP Project was reintroduced. Again phpinfo()
does not escape the content of user supplied arrays in GET, POST or COOKIE
variables when it displays them which leads to an XSS vulnerability.
DETAILS
Vulnerable Systems:
* PHP versions 4.4.3 to 4.4.6
* CVS version of PHP 6.0.
When the content of the request variables is printed to the user there is
a special handling for arrays that have to be printed in a recursive way.
Earlier versions of PHP did not escape them before output. This was fixed
in PHP 4.4.1. Later it turned out that due to output buffering it was
still possible to bypass the escaping. Therefore PHP nowadays passes the
write function to be used to the inner functions that are called to ensure
that the output is properly escaped. This fix was created for the PHP 5
tree and later backported to PHP 4.
Unfortunately the backport was only half and therefore the inner functions
accept the write function in the additional parameter, but do not use it
at all. This change reintroduced the vulnerability we disclosed in October
2005 back into PHP 4.4.3
To manually test for this vulnerability just call the phpinfo() page with
a parameter like this.
http://localhost/phpinfo.php?a[]=<script>alert(/XSS/);</script>
ADDITIONAL INFORMATION
The information has been provided by Hardened-PHP Project.
The original article can be found at:
<http://www.php-security.org/MOPB/MOPB-08-2007.html>
http://www.php-security.org/MOPB/MOPB-08-2007.html
========================================
This bulletin is sent to members of the SecuriTeam mailing list.
To unsubscribe from the list, send mail with an empty subject line and body to: list-unsubscribe@xxxxxxxxxxxxxx
In order to subscribe to the mailing list, simply forward this email to: list-subscribe@xxxxxxxxxxxxxx
====================
====================
DISCLAIMER:
The information in this bulletin is provided "AS IS" without warranty of any kind.
In no event shall we be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages.
- Prev by Date: [EXPL] webSPELL PHP Code Execution (Exploit)
- Next by Date: [UNIX] PHP WDDX Session Deserialization Information Leak Vulnerability
- Previous by thread: [EXPL] webSPELL PHP Code Execution (Exploit)
- Next by thread: [UNIX] PHP WDDX Session Deserialization Information Leak Vulnerability
- Index(es):
Relevant Pages
- [UNIX] cPanel mod_phpsuexec Vulnerability
... The following security advisory is sent to the securiteam mailing list, and can be
found at the SecuriTeam web site: http://www.securiteam.com ... The options used by cPanel
... user owning a web accessible PHP file. ... vulnerability and it has been
repaired. ... (Securiteam) - [UNIX] PHProjekt (Remote) Include Vulnerabilities
... The following security advisory is sent to the securiteam mailing list, and can be
found at the SecuriTeam web site: http://www.securiteam.com ... PHProjekt Include Vulnerabilities
... vulnerability had been introduced. ... execute arbitrary PHP code. ...
(Securiteam) - [UNIX] Multiple Vulnerabilities within PHP 4/5 (pack, unpack, safe_mode_exec_dir, safe_mode, realpat
... The following security advisory is sent to the securiteam mailing list, and can be
found at the SecuriTeam web site: http://www.securiteam.com ... PHP is "a widely-used general-purpose
scripting language that is ... several vulnerabilities within PHP were ... unserialize()
- Wrong Handling of Negative References ... (Securiteam) - [UNIX] Dotdeb PHP Email Header Injection Vulnerability
... The following security advisory is sent to the securiteam mailing list, and can be
found at the SecuriTeam web site: http://www.securiteam.com ... Dotdeb PHP Email Header Injection
Vulnerability ... This patch adds an X-PHP-Script header to ... (Securiteam) - [NEWS] PHP getimagesize() Multiple DoS Vulnerabilities
... The following security advisory is sent to the securiteam mailing list, and can be
found at the SecuriTeam web site: http://www.securiteam.com ... PHP is a widely-used general-purpose
scripting language that is especially ... Remote exploitation of a denial of service condition
in the PHP ... Local exploitation of an input validation vulnerability in The PHP Group's
... (Securiteam)