CVE-2002-0771
CVSS6.4
发布时间 :2002-08-12 00:00:00
修订时间 :2016-11-18 21:59:14
NMCOES    

[原文]Cross-site scripting vulnerability in viewcvs.cgi for ViewCVS 0.9.2 allows remote attackers to inject script and steal cookies via the (1) cvsroot or (2) sortby parameters.


[CNNVD]ViewCVS跨站脚本执行漏洞(CNNVD-200208-107)

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

- CVSS (基础分值)

CVSS分值: 6.4 [中等(MEDIUM)]
机密性影响: [--]
完整性影响: [--]
可用性影响: [--]
攻击复杂度: [--]
攻击向量: [--]
身份认证: [--]

- CPE (受影响的平台与产品)

cpe:/a:viewcvs:viewcvs:0.9
cpe:/a:viewcvs:viewcvs:0.8
cpe:/a:viewcvs:viewcvs:0.9.2
cpe:/a:viewcvs:viewcvs:0.9.1

- OVAL (用于检测的技术细节)

未找到相关OVAL定义

- 官方数据库链接

http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2002-0771
(官方数据源) MITRE
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2002-0771
(官方数据源) NVD
http://www.cnnvd.org.cn/vulnerability/show/cv_cnnvdid/CNNVD-200208-107
(官方数据源) CNNVD

- 其它链接及资源

http://archives.neohapsis.com/archives/bugtraq/2002-05/0161.html
(VENDOR_ADVISORY)  BUGTRAQ  20020518 cross-site scripting bug of ViewCVS
http://www.iss.net/security_center/static/9112.php
(VENDOR_ADVISORY)  XF  viewcvs-css(9112)
http://www.securityfocus.com/bid/4818
(VENDOR_ADVISORY)  BID  4818

- 漏洞信息

ViewCVS跨站脚本执行漏洞
中危 输入验证
2002-08-12 00:00:00 2005-10-20 00:00:00
远程  
        
        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)

- 漏洞信息 (21473)

ViewCVS 0.9.2 Cross-Site Scripting Vulnerability (EDBID:21473)
cgi webapps
2002-05-24 Verified
0 office
N/A [点击下载]
source: http://www.securityfocus.com/bid/4818/info

ViewCVS does not filter HTML tags from certain URL parameters, making it prone to cross-site scripting attacks.

An attacker may exploit this by constructing a malicious link with script code to a site running ViewCVS and sending it to a legitimate user of the site. When the legitimate user follows the link, the attacker's script code is executed in their web client in the security context of the website running ViewCVS. 

http://target/cgi-bin/viewcvs.cgi/viewcvs/?cvsroot=<script>alert("hello")</script>

http://target/cgi-bin/viewcvs.cgi/viewcvs/viewcvs/?sortby=rev"><script>alert("hello")</script>

		

- 漏洞信息

6458
ViewCVS viewcvs.cgi Multiple Parameter XSS
Remote / Network Access Input Manipulation
Loss of Integrity Patch / RCS, Third-Party Solution

- 漏洞描述

ViewCVS contains a flaw that allows a remote cross-site scripting (XSS) attack. This flaw exists because the application does not validate the 'cvsroot' and 'sortby' parameters upon submission to the 'viewcvs.cgi' script. This may allow a user to create a specially crafted URL that would execute arbitrary script code in a user's browser within the trust relationship between their browser and the server.

- 时间线

2002-05-18 Unknow
Unknow Unknow

- 解决方案

Products

Unknown or Incomplete

- 相关参考

- 漏洞作者

Unknown or Incomplete

- 漏洞信息

ViewCVS Cross-Site Scripting Vulnerability
Input Validation Error 4818
Yes No
2002-05-24 12:00:00 2009-07-11 12:46:00
Discovery of this issue is credited to office <office@office.ac>.

- 受影响的程序版本

ViewCVS ViewCVS 0.9.2
- Apache Software Foundation Apache 1.3.24
- Apache Software Foundation Apache 1.3.24
- Apache Software Foundation Apache 1.3.23
- Apache Software Foundation Apache 1.3.23
- Apache Software Foundation Apache 1.3.22
- Apache Software Foundation Apache 1.3.22
- Apache Software Foundation Apache 1.3.20
- Apache Software Foundation Apache 1.3.20
+ Debian Linux 3.0 sparc
+ Debian Linux 3.0 s/390
+ Debian Linux 3.0 ppc
+ Debian Linux 3.0 mipsel
+ Debian Linux 3.0 mips
+ Debian Linux 3.0 m68k
+ Debian Linux 3.0 ia-64
+ Debian Linux 3.0 ia-32
+ Debian Linux 3.0 hppa
+ Debian Linux 3.0 arm
+ Debian Linux 3.0 alpha
+ Debian Linux 3.0
+ S.u.S.E. Linux Personal 9.2
+ S.u.S.E. Linux Personal 9.1
+ S.u.S.E. Linux Personal 9.0 x86_64
+ S.u.S.E. Linux Personal 9.0
ViewCVS ViewCVS 0.9.1
- Apache Software Foundation Apache 1.3.24
- Apache Software Foundation Apache 1.3.24
- Apache Software Foundation Apache 1.3.23
- Apache Software Foundation Apache 1.3.23
- Apache Software Foundation Apache 1.3.22
- Apache Software Foundation Apache 1.3.22
- Apache Software Foundation Apache 1.3.20
- Apache Software Foundation Apache 1.3.20
ViewCVS ViewCVS 0.9
- Apache Software Foundation Apache 1.3.24
- Apache Software Foundation Apache 1.3.24
- Apache Software Foundation Apache 1.3.23
- Apache Software Foundation Apache 1.3.23
- Apache Software Foundation Apache 1.3.22
- Apache Software Foundation Apache 1.3.22
- Apache Software Foundation Apache 1.3.20
- Apache Software Foundation Apache 1.3.20
ViewCVS ViewCVS 0.8
- Apache Software Foundation Apache 1.3.24
- Apache Software Foundation Apache 1.3.24
- Apache Software Foundation Apache 1.3.23
- Apache Software Foundation Apache 1.3.23
- Apache Software Foundation Apache 1.3.22
- Apache Software Foundation Apache 1.3.22
- Apache Software Foundation Apache 1.3.20
- Apache Software Foundation Apache 1.3.20

- 漏洞讨论

ViewCVS does not filter HTML tags from certain URL parameters, making it prone to cross-site scripting attacks.

An attacker may exploit this by constructing a malicious link with script code to a site running ViewCVS and sending it to a legitimate user of the site. When the legitimate user follows the link, the attacker's script code is executed in their web client in the security context of the website running ViewCVS.

- 漏洞利用

The following examples may be used to reproduce this condition (results may vary depending upon the web browser)

http://target/cgi-bin/viewcvs.cgi/viewcvs/?cvsroot=&lt;script&gt;alert("hello")&lt;/script&gt;

http://target/cgi-bin/viewcvs.cgi/viewcvs/viewcvs/?sortby=rev"&gt;&lt;script&gt;alert("hello")&lt;/script&gt;

- 解决方案

The following untested patches have been made available by 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)

Additionally, Taku YASUI <tach@sourceforge.jp> also released an untested patch:

===================================================================
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)

Currently the SecurityFocus staff are not aware of any vendor-supplied patches for this issue. If you feel we are in error or are aware of more recent information, please mail us at: vuldb@securityfocus.com <mailto:vuldb@securityfocus.com>.

- 相关参考

 

 

关于SCAP中文社区

SCAP中文社区是国内第一个以SCAP为主题的中文开放社区。了解更多信息,请查阅[关于本站]

版权声明

CVE/CWE/OVAL均为MITRE公司的注册商标,它们的官方数据源均保存在MITRE公司的相关网站