ViewCVS跨站脚本执行漏洞

漏洞信息详情

ViewCVS跨站脚本执行漏洞

漏洞简介

ViewCVS是一款查看CVS系统的脚本,可使用在Unix和Linux操作系统下,也可使用在Microsoft Windows操作系统下。
ViewCVS对用户提供的数据未进行正确充分的检查,可导致远程攻击者进行跨站脚本执行攻击。
其中viewcvs.cgi对用户提供给URL的数据缺少过滤,攻击者可以在运行ViewCVS系统的站点上构建包含恶意代码的URL链接,当论坛用户浏览此包含恶意代码的链接时,就可以导致脚本代码在浏览用户浏览器中执行,使攻击者获得用户基于Cookie认证的敏感信息。

漏洞公告

临时解决方法:
如果您不能立刻安装补丁或者升级,CNNVD建议您采取以下措施以降低威胁:

* 设置浏览器,关闭JavaScript功能。

* 修改服务器程序,严格过滤用户输入数据。
厂商补丁:
ViewCVS
——-
Kenji Suzuki <kenji@po.ganseki.ne.jp>提供如下补丁:

— viewcvs.py.orig Fri Dec 14 23:14:39 2001

+++ viewcvs.py Sun Mar 31 15:24:34 2002

@@ -172,7 +172,7 @@

# parse the query params into a dictionary (and use defaults)

query_dict = default_settings.copy()

for name, values in cgi.parse().items():

– query_dict[name] = values[0]

+ query_dict[name] = cgi.escape(values[0])

# set up query strings, prefixed by question marks and ampersands

query = sticky_query(query_dict)

Taku YASUI <tach@sourceforge.jp>提供如下补丁:

RCS file: /cvsroot/viewcvs/viewcvs/lib/viewcvs.py,v

retrieving revision 1.107

retrieving revision 1.108

diff -u -r1.107 -r1.108

— viewcvs/viewcvs/lib/viewcvs.py 2002/02/22 09:20:46 1.107

+++ viewcvs/viewcvs/lib/viewcvs.py 2002/04/01 01:32:16 1.108

@@ -180,8 +180,14 @@

# parse the query params into a dictionary (and use defaults)

query_dict = default_settings.copy()

+

+ # RE that ViewCVS doesn’t use in any URL, but a CSS attack might

+ re_url_validate = re.compile(‘\’|”|<|>’)

for name, values in cgi.parse().items():

– query_dict[name] = values[0]

+ # do not accept values that contain non-ViewCVS characters

+ # except for search

+ if not re.search(re_url_validate, values[0]) or name == ‘search’:

+ query_dict[name] = values[0]

# set up query strings, prefixed by question marks and ampersands

query = sticky_query(query_dict)

参考网址

来源: BID
名称: 4818
链接:http://www.securityfocus.com/bid/4818

来源: XF
名称: viewcvs-css(9112)
链接:http://www.iss.net/security_center/static/9112.php

来源: BUGTRAQ
名称: 20020518 cross-site scripting bug of ViewCVS
链接:http://archives.neohapsis.com/archives/bugtraq/2002-05/0161.html

来源: BUGTRAQ
名称: 20020518 cross-site scripting bug of ViewCVS
链接:http://online.securityfocus.com/archive/1/273102

© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享