Archived CMSimple Support Forum

The Old CMSimple User Community
It is currently Thu Sep 02, 2010 4:38 pm

This archived CMSimple Support Forum will be locked primo June 2008. Users with a commercial licence are advised to register and use the new Official Support Forum at CMSimple.com instead. A community driven forum with free registration is found at cmsimpleforum.com.

All times are UTC




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 12 posts ] 
Author Message
 Post subject: CMSimple XXS vulnerable
PostPosted: Thu Jul 21, 2005 10:58 am 
Offline
Site Admin

Joined: Mon May 12, 2003 12:36 pm
Posts: 3091
Location: Rutsker, Bornholm, Denmark
Fix:

function printlink(){global $f,$search,$file,$sn,$su,$tx;$t=amp().'print';if($f=='search')$t.=amp().'function=search'.amp().'search='.$search;

should be replaced with:

function printlink(){global $f,$search,$file,$sn,$su,$tx;$t=amp().'print';if($f=='search')$t.=amp().'function=search'.amp().'search='.htmlspecialchars(stripslashes($search));

Will be fixed in next beta.


Last edited by harteg on Tue Jul 26, 2005 12:07 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 21, 2005 11:13 am 
Offline

Joined: Wed Dec 31, 2003 1:07 pm
Posts: 2494
Location: planet earth
-
Edit:

The same may occur with all other used variables. So make sure you check them all (function sanitize() would be a good idea for this).

Also, I suggest to remove the link showing the XSS.


djot

PS: Why you (mis-)use cmsimple.de for this?
-


Last edited by djot on Thu Jul 21, 2005 12:06 pm, edited 6 times in total.

Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 21, 2005 11:18 am 
Offline

Joined: Wed Dec 31, 2003 1:07 pm
Posts: 2494
Location: planet earth
-
By the way ... searching for nothing ("", just clicking the search button) finds results on many pages.

djot
-


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 21, 2005 12:22 pm 
Offline

Joined: Sun Oct 17, 2004 9:47 pm
Posts: 2505
but this seems to be only temporary? nothing is actually changed at the website...?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 21, 2005 12:27 pm 
Offline

Joined: Wed Dec 31, 2003 1:07 pm
Posts: 2494
Location: planet earth
-
I was asking me the same, but did remove that from above.

You can't access anything with this, since the input is shown in an echo function (not in exec() or somethin alike).

So no access to PHP, nor files, nor cookies nor other variables. And adding JS XSS is totally useless, since everything you can access is clientside (the hackers browser).


All this example shows is that the search input (and I guess many more variables) are not checked for correct user input.


djot
-


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 26, 2005 12:08 pm 
Offline
Site Admin

Joined: Mon May 12, 2003 12:36 pm
Posts: 3091
Location: Rutsker, Bornholm, Denmark
There is a page about the subject at http://www.securitytracker.com/alerts/2 ... 14556.html

(Removed the code and the link to cmsimple.de from my first posting).


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 26, 2005 2:38 pm 
Offline

Joined: Wed Dec 31, 2003 1:07 pm
Posts: 2494
Location: planet earth
-
Harteg wrote:
(Removed the code and the link to cmsimple.de from my first posting).

Thx. We don't want to wake up sleeping dogs, won't we? Also jens would feel better with this :)

djot
-


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 28, 2005 12:10 pm 
Offline

Joined: Tue Jul 19, 2005 7:59 pm
Posts: 625
Location: Behind your ...
djot wrote:
By the way ... searching for nothing ("", just clicking the search button) finds results on many pages.


Try something like :
Code:
if($f=='search'){$title=$tx['title']['search'];$ta=array();for($i=0;$i<$hl;$i++){if($search!=''&&@preg_match('/'.preg_quote($search,'/').'/i',$c[$hc[$i]]))$ta[]=$hc[$i];}$o.='<h1>'.$tx['search']['result'].'</h1><p>"'.htmlspecialchars(stripslashes($search)).'" ';if(count($ta)==0)$o.=$tx['search']['notfound'].'.';else{$o.=$tx['search']['foundin'].' '.count($ta). ' ';if(count($ta)>1)$o.=$tx['search']['pgplural'];else $o.=$tx['search']['pgsingular'];$o.=':';}$o.='</p>'.li($ta,'search');}


just added
Code:
$search!=''&&


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 28, 2005 12:15 pm 
Offline

Joined: Wed Dec 31, 2003 1:07 pm
Posts: 2494
Location: planet earth
well, this was a hint for Peter, to fix that in the official distribution...


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 08, 2005 11:52 am 
Offline
Site Admin

Joined: Mon May 12, 2003 12:36 pm
Posts: 3091
Location: Rutsker, Bornholm, Denmark
Added it at http://www.cmsimple.dk/?Downloads:Future_development


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 29, 2005 6:25 pm 
Offline

Joined: Mon Aug 29, 2005 6:05 pm
Posts: 1
I see that the fix is for only 2.4 version !

But I have a 2.3 also... do you have a solution for that old version ? Or it's better to upgrade to 2.4 and fix it ?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 30, 2005 7:09 am 
Offline
Site Admin

Joined: Mon May 12, 2003 12:36 pm
Posts: 3091
Location: Rutsker, Bornholm, Denmark
I didn't fix it in 2.4 as far as I remember, but in the beta 2.5 - it is only the one-liner function printlink() needed to be update (see first post).


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 12 posts ] 

All times are UTC


Who is online

Users browsing this forum: MSN [Bot] and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group