Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[FIX] BoostCMS XSS Exploit Fix - News Comments [FIX]

Newbie Spellweaver
Joined
Dec 9, 2010
Messages
41
Reaction score
7
This is a patch to fix the XSS Exploit in BoostCMS News Comments. I've discovered this exploit by using a special web security check software, few months ago while I'm checking the CMS. I decided to release this patch to public as it may help few users who are currently searching for the fix.

You may download the patch in the attachments below.

View attachment BoostCMS Patch by Airilxx.zip

Instructions: Put the patch in <your web server path>/Boost/Packages/Default/Templates/ . Please be remember, backup your original Comment.tpl and place somewhere else outside your server web folder :D:

Note: This patch is 100% created by me, I only changed few bits of codes :p:​

real code
Code:
<?php echo str_replace("\n", '<br>', htmlspecialchars($Comment['comment'])); ?>
replaced with
Code:
<?php echo strip_tags(str_replace("\n", '<br>', mysql_real_escape_string($Comment['comment']))) ?>
 

Attachments

You must be registered for see attachments list
Last edited:
R.I.P Millercent
Loyal Member
Joined
Nov 6, 2012
Messages
2,230
Reaction score
314
Why make it a download when you can just make a quick tutorial showing users what pieces of code to change.. Would it not be more logical doing such?
 
Newbie Spellweaver
Joined
Dec 9, 2010
Messages
41
Reaction score
7
Why make it a download when you can just make a quick tutorial showing users what pieces of code to change.. Would it not be more logical doing such?

I would do that, but I'm currently in lack of pc access. The attached files were directly compressed straight away from my vps server.
 
Newbie Spellweaver
Joined
Dec 25, 2013
Messages
41
Reaction score
3
This is a patch to fix the XSS Exploit in BoostCMS News Comments. I've discovered this exploit by using a special web security check software, few months ago while I'm checking the CMS. I decided to release this patch to public as it may help few users who are currently searching for the fix.

You may download the patch in the attachments below.

View attachment 150721

Instructions: Put the patch in <your web server path>/Boost/Packages/Default/Templates/ . Please be remember, backup your original Comment.tpl and place somewhere else outside your server web folder :D:

Note: This patch is 100% created by me, I only changed few bits of codes :p:​
Can you post some screens, please? Thanks :)
 
Experienced Elementalist
Joined
Jul 4, 2007
Messages
219
Reaction score
20
the only thing has been changed is within line 24 also @FatalLulz is correct, you should make us aware of what fixed this exploit in future releases

real code
Code:
<?php echo str_replace("\n", '<br>', htmlspecialchars($Comment['comment'])); ?>
replaced with
Code:
<?php echo strip_tags(str_replace("\n", '<br>', mysql_real_escape_string($Comment['comment']))) ?>
 
Skilled Illusionist
Joined
Dec 20, 2013
Messages
365
Reaction score
64
But the htmlspecialchars is the code that makes it non exploitable like u cant use specialchars or something lke that if i aint much wrong
 
Newbie Spellweaver
Joined
Dec 9, 2010
Messages
41
Reaction score
7
But the htmlspecialchars is the code that makes it non exploitable like u cant use specialchars or something lke that if i aint much wrong
Yes, its true, but in this case, the "exploiter" can input " < > ( ) " <- these tags secretly in comments to script a unique popup that displays unique codes, to steal users sessions, on the news page which had enabled comments. Well, you can replicate the XSS wth Acunetix Scanner if you want, just use the clean install of BoostCMS 2.0
 
Newbie Spellweaver
Joined
Dec 9, 2010
Messages
41
Reaction score
7
the only thing has been changed is within line 24 also @FatalLulz is correct, you should make us aware of what fixed this exploit in future releases

real code
Code:
<?php echo str_replace("\n", '<br>', htmlspecialchars($Comment['comment'])); ?>
replaced with
Code:
<?php echo strip_tags(str_replace("\n", '<br>', mysql_real_escape_string($Comment['comment']))) ?>
Alrite, Noted [emoji4] I'll update this thread with the code snippets soon.
 
Newbie Spellweaver
Joined
Dec 9, 2010
Messages
41
Reaction score
7
Thanks for this release, good to see the community spirit is here.
Most welcome :) I decided to release here as I saw some peoples, esp. my mates, were able to fix these problems, but they won't share the codes on public. [emoji4]
 
Newbie Spellweaver
Joined
Dec 9, 2010
Messages
41
Reaction score
7
Yes I know but if I remember you can only execute simple javascript code on htmlspecialchars, you can't get cookie
Well, if u refused to trust me, you can replicate it by using acunetix web scanner. I dont want to quarrel over these things on my thread. I released this to help some people who want get rid of such problems.
 
Newbie Spellweaver
Joined
Dec 9, 2010
Messages
41
Reaction score
7
Well then, change the strings to other if it doesn't suitable.
I use references from web to fix these exploits, so the variables that i've use might be outdated.
 
Back
Top