SecurityTracker.com
    Home    |    View Topics    |    Search    |    Contact Us    |   

SecurityTracker
Archives


 


Category:   Application (Forum/Board/Portal)  >   MyBB Vendors:   MyBB Group
MyBB Input Validation Hole in 'usercp.php' Permits Cross-Site Scripting Attacks
SecurityTracker Alert ID:  1014081
SecurityTracker URL:  http://securitytracker.com/id/1014081
CVE Reference:   GENERIC-MAP-NOMATCH   (Links to External Site)
Date:  May 31 2005
Impact:   Disclosure of authentication information, Disclosure of user information, Execution of arbitrary code via network, Modification of user information

Version(s): 1.0 RC4
Description:   An input validation vulnerability was reported in MyBB in 'usercp.php'. A remote user can conduct cross-site scripting attacks.

The 'usercp.php' script does not properly validate user-supplied input in the 'website' parameter. A remote user can submit specially crafted input that, when viewed by a target user, will cause arbitrary scripting code to be executed by the target user's browser. The code will originate from the site running the MyBB 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.

August Christopher reported this vulnerability.

Impact:   A remote user can access the target user's cookies (including authentication cookies), if any, associated with the site running the MyBB 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 vendor solution was available at the time of this entry.
Vendor URL:  www.mybboard.com/ (Links to External Site)
Cause:   Input validation error
Underlying OS:  Linux (Any), UNIX (Any), Windows (Any)

Message History:   None.


 Source Message Contents

Subject:  MyBB 1.0 RC4 XSS Bug


Description: MyBB is a powerful, efficient and free forum package
developed in PHP and MySQL. MyBB has been designed with the end users
in mind, you and your subscribers. Full control over your discussion
system is presented right at the tip of your fingers, from multiple
styles and themes to the ultimate customisation of your forums using
the template system.

Exploit: The Website field of a users profile doesnt properly sanitize
user input before inserting the data into the database.  This allows
for the injection of HTML and scripting which can be utilized to
affect the way a website displays, steal cookies containing password
hashes, redirect the user completely, and perform various other tasks.
 It affects the current version of MyBB 1.0 RC 4, and should be fixed
by the time the gold release comes out.

Solution: 

Find line 329 in the file usercp.php containing the code `$website =
addslashes($website);`

Place cursor at the end of the line and hit enter twice, then either
type in or paste the following block
of code

// Begin XSS Fix
$website = strip_tags($website); // strip the tags
$filter = array("\"", "\'", "<", ">", "@", "[", "]");  // build an
array of characters to remove
$website = str_replace($filter, "", $website); // remove all of the
items in the array
$website = eregi_replace("[\s]", "", $website); // strips out
whitespace that is left after sanitizing input
// End XSS Fix

This code strips out characters that can appear in XSS as well as
cleans up spaces left after the suspect characters are removed.  This
does not fix XSS already in someones profile, thats a simple matter of
manipulating the database or using the admin panel to remove the code.

-- 
"The Nelson-Shepherd cutoff: The point at which you realise someone is
an idiot while trying to help them."

 
 


Go to the Top of This SecurityTracker Archive Page





Home   |    View Topics   |    Search   |    Contact Us

This web site uses cookies for web analytics. Learn More

Copyright 2021, SecurityGlobal.net LLC