phpBB 'usercp_register.php' Error Lets Remote Users Conduct Cross-Site Sc ript

Posted on Monday, March 07, 2005 @ 12:31:09 CST in Security
by Raven

southern writes:  
SecurityTracker Alert ID: 1013362 SecurityTracker URL: http://securitytracker.com/id?1013362 CVE Reference: GENERIC-MAP-NOMATCH (Links to External Site) Date: Mar 3 2005
Impact: Disclosure of authentication information, Disclosure of user information, Execution of arbitrary code via network, Modification of user information
Exploit Included: Yes
Version(s): 2.0.13 and prior versions
Description: A vulnerability was reported in phpBB in the 'usercp_register.php' script. A remote user can conduct cross-site sc ripting attacks.
A remote user can submit a specially crafted signature via a private message that, when viewed by a target user, will cause arbitrary sc ripting code to be executed by the target user's browser. The code will originate from the site running the phpBB software and will run in the security context of that site. As a result, the code will be able to access the target user's cookies (including authentication cookies), if any, associated with the site, access data recently submitted by the target user via web form to the site, or take actions on the site acting as the target user.
The remote user can submit input to 'usercp_register.php' with a variable named 'allowhtml', 'allowbbcode', or 'allowsmilies' to trigger this vulnerability.
Paisterist from [N]eo [S]ecurity [T]eam discovered this vulnerability.
Impact: A remote user can access the target user's cookies (including authentication cookies), if any, associated with the site running the phpBB software, access data recently submitted by the target user via web form to the site, or take actions on the site acting as the target user.
Solution: No solution was available at the time of this entry.
Vendor URL: www.phpbb.com/ (Links to External Site)
Cause: Input validation error
Underlying OS: Linux (Any), UNIX (Any), Windows (Any)
Reported By: Paisterist
Message History: None.
http://securitytracker.com/alerts/2005/Mar/1013362.html
 
 
click Related        click Share
 
 

Re: phpBB 'usercp_register.php' Error Lets Remote Users Conduct Cross-Site Sc ript (Score: 1)
by chatserv on Monday, March 07, 2005 @ 12:50:58 CST

(User Info | Send a Message) http://www.scriptheaven.net

If i understand this one at all i would say it can be patched by finding in usercp_register.php:

$attachsig = ( isset($HTTP_POST_VARS['attachsig']) ) ? ( ($HTTP_POST_VARS['attachsig']) ? TRUE : 0 ) : $board_config['allow_sig'];

$allowhtml = ( isset($HTTP_POST_VARS['allowhtml']) ) ? ( ($HTTP_POST_VARS['allowhtml']) ? TRUE : 0 ) : $board_config['allow_html'];
$allowbbcode = ( isset($HTTP_POST_VARS['allowbbcode']) ) ? ( ($HTTP_POST_VARS['allowbbcode']) ? TRUE : 0 ) : $board_config['allow_bbcode'];
$allowsmilies = ( isset($HTTP_POST_VARS['allowsmilies']) ) ? ( ($HTTP_POST_VARS['allowsmilies']) ? TRUE : 0 ) : $board_config['allow_smilies'];
}
else
{
$attachsig = ( isset($HTTP_POST_VARS['attachsig']) ) ? ( ($HTTP_POST_VARS['attachsig']) ? TRUE : 0 ) : 0;

$allowhtml = ( isset($HTTP_POST_VARS['allowhtml']) ) ? ( ($HTTP_POST_VARS['allowhtml']) ? TRUE : 0 ) : $userdata['user_allowhtml'];
$allowbbcode = ( isset($HTTP_POST_VARS['allowbbcode']) ) ? ( ($HTTP_POST_VARS['allowbbcode']) ? TRUE : 0 ) : $userdata['user_allowbbcode'];
$allowsmilies = ( isset($HTTP_POST_VARS['allowsmilies']) ) ? ( ($HTTP_POST_VARS['allowsmilies']) ? TRUE : 0 ) : $userdata['user_allowsmile'];


And changing to:

$attachsig = ( isset($HTTP_POST_VARS['attachsig']) ) ? ( (intval($HTTP_POST_VARS['attachsig'])) ? TRUE : 0 ) : $board_config['allow_sig'];

$allowhtml = ( isset($HTTP_POST_VARS['allowhtml']) ) ? ( (intval($HTTP_POST_VARS['allowhtml'])) ? TRUE : 0 ) : $board_config['allow_html'];
$allowbbcode = ( isset($HTTP_POST_VARS['allowbbcode']) ) ? ( (intval($HTTP_POST_VARS['allowbbcode'])) ? TRUE : 0 ) : $board_config['allow_bbcode'];
$allowsmilies = ( isset($HTTP_POST_VARS['allowsmilies']) ) ? ( (intval($HTTP_POST_VARS['allowsmilies'])) ? TRUE : 0 ) : $board_config['allow_smilies'];
}
else
{
$attachsig = ( isset($HTTP_POST_VARS['attachsig']) ) ? ( (intval($HTTP_POST_VARS['attachsig'])) ? TRUE : 0 ) : 0;

$allowhtml = ( isset($HTTP_POST_VARS['allowhtml']) ) ? ( (intval($HTTP_POST_VARS['allowhtml'])) ? TRUE : 0 ) : $userdata['user_allowhtml'];
$allowbbcode = ( isset($HTTP_POST_VARS['allowbbcode']) ) ? ( (intval($HTTP_POST_VARS['allowbbcode'])) ? TRUE : 0 ) : $userdata['user_allowbbcode'];
$allowsmilies = ( isset($HTTP_POST_VARS['allowsmilies']) ) ? ( (intval($HTTP_POST_VARS['allowsmilies'])) ? TRUE : 0 ) : $userdata['user_allowsmile'];

Basically insert a intval() check on the middle value of all lines posted

Re: phpBB 'usercp_register.php' Error Lets Remote Users Conduct Cross-Site Sc ript (Score: 1)
by southern
on Monday, March 07, 2005 @ 23:09:51 CST
(User Info | Send a Message)

If you understand this at all? lol If you don't noone does! Anyway I put your code in my registeruser_cp.php and it didn't break it so it's fixed now. :)

 
News ©

Site Info

Last SeenLast Seen
  • vashd1
  • neralex
Server TrafficServer Traffic
  • Total: 513,982,971
  • Today: 102,407
Server InfoServer Info
  • Apr 29, 2025
  • 10:19 pm CDT