PHP phpinfo() Function Query String XSS

2002-10-12T08:30:07
ID OSVDB:4619
Type osvdb
Reporter OSVDB
Modified 2002-10-12T08:30:07

Description

Vulnerability Description

PHP contains a flaw that allows a remote cross site scripting attack. This flaw exists because the application does not validate the "phpinfo()" variable upon submission to the "soinfo.php" script. This could allow a user to create a specially crafted URL that would execute arbitrary code in a user's browser within the trust relationship between the browser and the server, leading to a loss of integrity.

Solution Description

Upgrade to version 4.3.5 or higher, as it has been reported to fix this vulnerability. It is also possible to correct the flaw by implementing the following workaround: set expose_php = Off in php.ini

Short Description

PHP contains a flaw that allows a remote cross site scripting attack. This flaw exists because the application does not validate the "phpinfo()" variable upon submission to the "soinfo.php" script. This could allow a user to create a specially crafted URL that would execute arbitrary code in a user's browser within the trust relationship between the browser and the server, leading to a loss of integrity.

Manual Testing Notes

http://[victim]/soinfo.php?"><SCRIPT>alert(document.cookie)</SCRIPT>

Where "soinfo.php" is any script that calls the function like this: <?php phpinfo(); ?>

References:

Vendor URL: http://www.php.net/ Other Advisory URL: http://techie.hopto.org/vulns/2002-36.txt Mail List Post: http://archives.neohapsis.com/archives/vulnwatch/2002-q4/0021.html Mail List Post: http://archives.neohapsis.com/archives/bugtraq/2003-06/0027.html Keyword: PHP bug ID #19881 ISS X-Force ID: 10355 CVE-2002-1954 Bugtraq ID: 7805