Title: PHP Nuke User/Administrator Account Compromise Vulnerability
Severity: HIGH
Description:
PHP Nuke uses a global variable named '$user'. It is normally retrieved from a cookie, but can be supplied in the URL. This value contains uuencoded values for the user information and the user's password hash.
These values are decoded on the server and used in various SQL queries during the execution of PHP Nuke scripts.
Because they are not *properly* 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]'");
Several variables used in this query contain user-supplied input. These values may be injected into a uuencoded $user variable passed in a URL.
PHP-Nuke decodes $user and splits its contents into the $user3[] array.
These values are then used to construct an SQL query. Since they are *uuencoded, a malicious SQL query can be constructed and the metacharacters will still be passed .* Normally, PHP4 protects against malicious metacharacters, escaping them. 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.
If exploited, the attacker will have gained the encrypted password and user information of the target user. The password could then be brute-forced, allowing further compromises of security on the affected host, including arbitrary file access and remote command execution as the webserver process.
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.