Your Account does no validation to the avatar remote links and the avatar gallery selection. Nor does it even check that these avatars are allowed to be saved, per the configuration of the Forums. This may allow SQL injection and other nasty things.
(Avatar uploading itself is controlled by the Forums files.. which I assume has proper validation)
Issue and original fix credit to Prophet
MOD-FRIENDLY VERSION
IN modules/Your_Account/index.php
FIND
Code:
function avatarsave($avatar, $category) {
global $user_prefix, $db, $module_name, $user, $cookie;
if (is_user($user)) {
REPLACE WITH
Code:
function avatarsave($avatar, $category) {
global $user_prefix, $db, $module_name, $user, $cookie, $prefix;
$sql = "SELECT * FROM ".$prefix."_bbconfig WHERE config_name = 'allow_avatar_local'";
$result = $db->sql_query($sql);
if ($row = $db->sql_fetchrow($result))
{
$allow_avatar_local = $row['config_value'];
}
else { $allow_avatar_local = 0; }
if (is_user($user) AND $allow_avatar_local) {
Any version of PHP-Nuke which allows the user to link to an offsite avatar via Your_Account module is vulnerable.
The best way to prevent an attack through the avatar linking is to simply disable the feature. However, since Your_Account module does not even check to see if the feature is enabled or disabled by the Admin, I still recommend patching the file.
The patch will not protect from every possible kind of attack because it only checks the link ... the data itself is not validated.
So, presently the only real fix is this ...
Find and replace the entire avatarlinksave function with ...
Code:
function avatarlinksave($avatar) {
include("header.php");
title("Disabled!");
OpenTable();
nav();
CloseTable();
OpenTable();
echo "Error: This feature is disabled!";
CloseTable();
include("footer.php");
}
That's in modules/Your_Account/index.php
_________________ - Prophet
Get the Last Visit module (and others modules I designed) from my website! FREE! http://jasonlau.biz
My code does indeed check whether it is allowed - per the configuration in your Forums. If that is not working, please verify it and tell me how I can duplicate it
You are correct that there are remote image problems. But that is not a specific phpNuke issue. Any site that allows remote links may have problems.
If there is a specific hack people are using, then please message them to me
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum