Ok, I've got some customer replies, which are in troubles, because lame providers are shutting down their forums instead of upgrading PHP version. I am paying everybody's attention: the first issue provided, is not a bug of miniBB, it's a bug of PHP/Zend application. It's a very serious bug, because if there is some way when unset() function may not work, there is no way to use alternative function or solution.
The second issue I would like to pay your attention to, is that this vulnerability will work only with register_globals set to ON.
Below is hot fix of this trouble, which should work for your miniBB installation, even if you have this vulnerability available. This is the only available solution currently. We are working on miniBB 2.0.2 these days, but still can not release the full package with fixed patch, because it will contain a lot of changes, which affect miniBB core files in general. So, enjoy the version 2.0.1 currently.
miniBB users with versions older than 2.0 can not simply overwrite the patched files, because their versions will not work with other updated files.
You don't need to apply the patches below, if your forums are not vulnerable. You can check this, running URL like
[your_forums]/index.php?includeHeader=http://www.google.com/?&-2690019 46=1&-834358190=1
If you will see a "Google" site above your forums, when executing this, your forums are vulnerable, and you need to apply the patch:
1) Edit index.php, and at the top of the script, where it says:
for($i=0;$i<sizeof($unset);$i++) if(isset(${$unset[$i]})) unset(${$unset[$i]});
it should be like that
for($i=0;$i<sizeof($unset);$i++) if(isset(${$unset[$i]})) { ${$unset[$i]}=''; unset(${$unset[$i]}); }
At the bottom of the same script, where it says
if(isset($includeFooter)) include($includeFooter);
it should be
if(isset($includeFooter) and $includeFooter!='') include($includeFooter);
2) Edit bb_functions.php, locate load_header() function, and in the place where it says
if(isset($GLOBALS['includeHeader'])) { include($GLOBALS['includeHeader']); return; }
it should be
if(isset($GLOBALS['includeHeader']) and $GLOBALS['includeHeader']!='') { include($GLOBALS['includeHeader']); return; }
3) Edit bb_admin.php (administration file) and do almost the same as for index.php:
at the top of the script
for($i=0;$i<sizeof($unset);$i++) if(isset(${$unset[$i]})) unset(${$unset[$i]});
should be
for($i=0;$i<sizeof($unset);$i++) if(isset(${$unset[$i]})) { ${$unset[$i]}=''; unset(${$unset[$i]}); }
at the bottom of the script it lists
if(isset($includeFooter)) include($includeFooter);
but should be
if(isset($includeFooter) and $includeFooter!='') include($includeFooter);
Everybody is welcome to give additional questions related to the problem. |