Mephisto Blog Author Comment HTML注入漏洞

QQ空间 新浪微博 微信 QQ facebook twitter
漏洞ID 1191163 漏洞类型 跨站脚本
发布时间 2007-03-29 更新时间 2007-03-31
CVE编号 CVE-2007-1768 CNNVD-ID CNNVD-200703-685
漏洞平台 N/A CVSS评分 4.3
|漏洞来源
https://cxsecurity.com/issue/WLB-2007030187
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-200703-685
|漏洞详情
Mephisto0.7.3和MephistoEdge20070325的app/helpers/application_helper.rb中存在跨站脚本攻击漏洞。远程攻击者可以借助评论中的作者名字段,注入任意的web脚本或HTML。
|漏洞EXP
Hello everyone!

Current bleeding-edge version of Mephisto blog is vulnerable to XSS.  
Comment's author name accept javascript code. If admin approves/ 
rejects comments manually, he have to load all unapproved comments,  
so it's possible to fetch his session id.

Example

Add new comment with the following author name: <script>alert 
(document.cookie)</script>
Then from admin's overview section check this comment - you'll see  
message with cookie.
If you manually approve your comments, check list of pending comments.

How to fix it

patch for <approot>/app/helpers/application_helper.rb :

5c5
<     return comment.author if comment.author_url.blank?
---
 >     return h(comment.author) if comment.author_url.blank?

Best wishes!
Sergey Tikhonov
|参考资料

来源:XF
名称:mephisto-author
名称-xss(33230)
链接:http://xforce.iss.net/xforce/xfdb/33230
来源:BID
名称:23137
链接:http://www.securityfocus.com/bid/23137
来源:BUGTRAQ
名称:20070325MephistoblogisvulnerabletoXSS
链接:http://www.securityfocus.com/archive/1/archive/1/463825/100/0/threaded
来源:OSVDB
名称:35309
链接:http://osvdb.org/35309
来源:SREASON
名称:2490
链接:http://securityreason.com/securityalert/2490