Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Exploits-HackingTools
[Top] [All Lists]

[UNIX] PHP4 phpinfo() XSS Vulnerability (Reintroduced)

Subject: [UNIX] PHP4 phpinfo() XSS Vulnerability (Reintroduced)
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@securiteam.com 
In order to subscribe to the mailing list, simply forward this email to: 
list-subscribe@securiteam.com 


==================== 
==================== 

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 in Thread] Current Thread [Next in Thread>
  • [UNIX] PHP4 phpinfo() XSS Vulnerability (Reintroduced), SecuriTeam <=