PDA

View Full Version : YaPiG Multiple Vulnerabilities


admin
06-06-2005, 10:19 AM
YaPiG (Yet Another PHP Image Gallery)
http://yapig.sourceforge.net (http://yapig.sourceforge.net/)
06-06-2005

http://secunia.com/advisories/15600/

Description:
Some vulnerabilities have been reported in YaPiG, which can be exploited to remove or create arbitrary directories, conduct cross-site scripting attacks, and compromise a vulnerable system.

1) It is possible to upload arbitrary files to a directory inside the web root. This can e.g. be exploited to execute arbitrary PHP code by uploading a malicious PHP file.

Successful exploitation requires administrative privileges.

2) Input passed to the "phid" parameter in "view.php" isn't properly sanitised before being returned to users. This can be exploited to execute arbitrary HTML and script code in a user's browser session in context of a vulnerable site.

3) Input passed to the "BASE_DIR" and "YAPIG_PATH" parameters isn't properly verified, before it is used to include files. This can be exploited to include arbitrary files from external and local resources.

Successful exploitation requires that "register_globals" is enabled.

4) Input passed to the "dir" parameter in "upload.php" isn't properly verified before being used. This can be exploited to create or remove arbitrary directories via directory traversal attacks.

Successful exploitation requires administrative privileges.

The vulnerabilities have been reported in versions 0.92b, 0.93u, and 0.94u. Other versions may also be affected.

Solution:
Edit the source code to ensure that input is properly sanitised.