As it was recently reported by "
High Tech Bridge" website, respectively, issue
#HTB22671 and
#HTB22670, there were found an XSS and SQL injection vulnerabilities, which are fixed in this release.
The files to fix are
bb_func_usrdat.php (which you simply may overwrite to your existing file), and
bb_codes.php, specifically, BB codes for [img] and [imgs] tags containing a possible ALT.
For fixing BB codes, locate the following and update your file, in the function
enCodeBB() only.
It was:
/* local images - allowed for everybody */
...
/* fixed width and ALT */
$pattern[]='#\[imgs=('.$dotsSiteUrl.'[^<> \n\r\[\]&]+?)\.(gif|jpg|jpeg|png)\](.+?)\[/imgs\]#i';
...
/* Non-declared code - without fixed width, with mandatory alt */
$pattern[]='#\[img=('.$dotsSiteUrl.'[^<> \n\r\[\]&]+?)\.(gif|jpg|jpeg|png)\](.+?)\[/img\]#i';
/* external images - only allowed the proper extensions and codes by permission */
...
/* fixed width and ALT */
$pattern[]="/\[imgs=(http[s]*:\/\/([^<> \n\r\[\]&]+?)\.(gif|jpg|jpeg|png))\](.+?)\[\/imgs\]/i";
...
/* Non-declared code - without fixed width, with alt - external images */
$pattern[]="/\[img=(http[s]
*:\/\/([^<> \n\r\[\]&]+?)\.(gif|jpg|jpeg|png))\](.+?)\[\/img\]/i";
It is now:/* local images - allowed for everybody */
...
/* fixed width and ALT */
$pattern[]='#\[imgs=('.$dotsSiteUrl.'[^<> \n\r\[\]&]+?)\.(gif|jpg|jpeg|png)\]([^<>\n\r\[\]&=/"\']
+?)\[/imgs\]#i';
...
/* Non-declared code - without fixed width, with mandatory alt */
$pattern[]='#\[img=('.$dotsSiteUrl.'[^<> \n\r\[\]&]+?)\.(gif|jpg|jpeg|png)\]([^<>\n\r\[\]&=/"\']
+?)\[/img\]#i';
...
/* external images - only allowed the proper extensions and codes by permission */
...
/* fixed width and ALT */
$pattern[]="/\[imgs=(http[s]*:\/\/([^<> \n\r\[\]&]+?)\.(gif|jpg|jpeg|png))\]([^<>\n\r\[\]&=\/\"']+?)\[\/imgs\]/i";
...
/* Non-declared code - without fixed width, with alt - external images */
$pattern[]="/\[img=(http[s]
*:\/\/([^<> \n\r\[\]&]+?)\.(gif|jpg|jpeg|png))\]([^<>\n\r\[\]&=\/\"']+?)\[\/img\]/i";
Please report if you find any troubles with it, or any new issues.
Download miniBB 2.5a and upgrade today! Despite I can't find the "right" door for these issues, it doesn't mean there are no talented hackers around which could compromise your forum.