J-Security Center

Title: PHP Nuke Forged User Info Cookie Vulnerability

Severity: MODERATE

Description:

PHP-Nuke fails to properly validate user-supplied input.

PHP Nuke employs a global variable called '$user'. It is normally retrieved as a cookie, but can be supplied in a URL submitted to the server.

$user is decoded by the server and split into several variables, which are used in turn in building various SQL queries during the execution of PHP Nuke scripts.

Because they are not checked for SQL metacharacters, these variables can be used to rewrite the SQL queries constructed and executed by PHP.

The vulnerability is present in calls to mysql_query(), as follows:

mysql_query("select uid, name, uname, email, femail, url, pass, storynum, umode, uorder, thold, noscore, bio, ublockon, ublock, theme, commentmax from users
where uname='$user3[1]' and pass='$user3[2]'");

Normally, PHP4 protects against malicious metacharacters, escaping them. However, since they are obfuscated by uuencode, they are not detected and their metacharacters will persist unescaped when the variable is decoded and used.

Attackers may modify the query so that its logic forces retrieval of sensitive information associated with arbitrary users. This could be accomplished if the attacker has a valid username.

Properly exploited, the attacker will have gained the encrypted password and user information of the target user.

The password could then be brute-forced with a dictionary attack, allowing the attacker to carry out further hostile actions and compromises of the host's security.

Affected Products:

  • Francisco Burzi PHP-Nuke 4.0.0
  • Francisco Burzi PHP-Nuke 4.3.0
  • Francisco Burzi PHP-Nuke 4.4.0

Juniper Networks provides this content via a wide variety of sources and production methods. If notified of errors or omissions in the content of this page, Juniper Networks, at its discretion, will modify or remove the page or leave the content as is, depending on various factors including but not limited to the reputation and authority of the party providing the notification. Please use the contact information displayed elsewhere on this page to report any errors or omissions regarding the content on this page.