CVE-2004-0251
CVSS6.8
发布时间 :2004-11-23 00:00:00
修订时间 :2016-10-17 22:42:28
NMCOES    

[原文]Cross-site scripting (XSS) vulnerability in rxgoogle.cgi allows remote attackers to execute arbitrary script as other users via the query parameter.


[CNNVD]RXGoogle.CGI跨站脚本攻击漏洞(CNNVD-200411-066)

        Rxgoogle.cgi存在跨站脚本攻击(XSS)漏洞。远程攻击者可以借助query参数,以其他用户的身份执行任意脚本。

- CVSS (基础分值)

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

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

产品及版本信息(CPE)暂不可用

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

未找到相关OVAL定义

- 官方数据库链接

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

- 其它链接及资源

http://marc.info/?l=bugtraq&m=107594183924958&w=2
(UNKNOWN)  BUGTRAQ  20040204 rxgoogle.cgi XSS Vulnerability.
http://www.securityfocus.com/bid/9575
(UNKNOWN)  BID  9575
http://xforce.iss.net/xforce/xfdb/15043
(UNKNOWN)  XF  rxgoogle-query-xss(15043)

- 漏洞信息

RXGoogle.CGI跨站脚本攻击漏洞
中危 跨站脚本
2004-11-23 00:00:00 2007-01-02 00:00:00
远程  
        Rxgoogle.cgi存在跨站脚本攻击(XSS)漏洞。远程攻击者可以借助query参数,以其他用户的身份执行任意脚本。

- 公告与补丁

        The following patch has been submitted by a third party and is untested:
        ----START
        --- rxgoogle.cgi 2004-02-04 14:20:38.000000000 -0500
        +++ test 2004-02-04 14:27:29.000000000 -0500
        @@ -197,7 +197,13 @@
         my $req = new HTTP::Request GET => "$url";
         my $res = $ua->request($req);
         if ($res->is_success) { $page_returned =
        $res->content; } return $page_returned;}
        -sub parse{my (@pairs, %in);my (@pairs, %in);my
        ($buffer, $pair, $name, $value);if
        ($ENV{'REQUEST_METHOD'} eq 'GET') {@pairs = split(/&/,
        $ENV{'QUERY_STRING'});}elsif($ENV{'REQUEST_METHOD'} eq
        'POST') {read(STDIN, $buffer,
        $ENV{'CONTENT_LENGTH'});@pairs = split(/&/,
        $buffer);}PAIR: foreach $pair (@pairs) {($name,
        $value) = split(/=/, $pair);$name =~ tr/+/ /;$name =~
        s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",
        hex($1))/eg;$value =~ tr/+/ /;$value =~
        s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",
        hex($1))/eg;($value eq "---") and next PAIR;exists
        $in{$name} ? ($in{$name} .= "~~$value") : ($in{$name}
        = $value);}return %in;}
        +
        +# This parsing routine poorly sanitized user-input,
        thus allowing injection
        +# of metametachars, such as '<' and '>'. I have
        patched the problem now, by
        +# filtering input quite well now.
        +#
        +# -Shaun2k2
        +sub parse{$OK_CHARS='-a-zA-Z0-9_.@'; my (@pairs,
        %in);my (@pairs, %in);my ($buffer, $pair, $name,
        $value);if ($ENV{'REQUEST_METHOD'} eq 'GET') {@pairs =
        split(/&/,
        $ENV{'QUERY_STRING'});}elsif($ENV{'REQUEST_METHOD'} eq
        'POST') {read(STDIN, $buffer,
        $ENV{'CONTENT_LENGTH'});@pairs = split(/&/,
        $buffer);}PAIR: foreach $pair (@pairs) {($name,
        $value) = split(/=/, $pair);$name =~ tr/+/ /;$name =~
        s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",
        hex($1))/eg;$name =~ s/[^$OK_CHARS]/_/go;$value =~
        tr/+/ /;$value =~
        s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",
        hex($1))/eg;$value =~ s/[^$OK_CHARS]/_/go;($value eq
        "---") and next PAIR;exists $in{$name} ? ($in{$name}
        .= "~~$value") : ($in{$name} = $value);}return %in;}
         sub html_navbar{my
        ($maxhits,$current,$numhits,$url)=0;my ($html, $nh,
        $prev_hit, $next_hit, $left, $right, $first, $last,
        $lower, $upper)="";$maxhits =shift; $numhits =shift;
        $current =shift; $url =shift;
        $nh=int($current/$maxhits)+1; $prev_hit=$nh-1;
        $next_hit=$nh+1; if (($current + $maxhits) >=
        $numhits) {$next_hit=0;}if ($numhits > $maxhits) {
         $left = $nh; $right = int($numhits/$maxhits) -
        $nh; ($left > 7) ? ($lower = $left -
        7) : ($lower = 1); ($right > 7) ? ($upper = $nh
        + 7) : ($upper = int($numhits/$maxhits) + 1);
        (7 - $nh >= 0) and ($upper = $upper + (8 - $nh));
         ($nh > ($numhits/$maxhits - 7)) and ($lower = $lower
        - ($nh - int($numhits/$maxhits - 7) - 1));
        $html = ""; ($nh > 1) and ($html .= qq~        href="$url&start=$prev_hit">[previous] ~);
        for ($i = 1; $i <= int($numhits/$maxhits) + 1; $i++) {
         if ($i < $lower) { $html .= " ... "; $i =
        ($lower-1); next; } if ($i >
        $upper) { $html .= " ... "; last; } ($i ==
        $nh) ? ($html .= qq~$i ~) :
         ($html .= qq~$i ~);
         (($i * $maxhits) >= $numhits) and last;
        }if ($next_hit) { $html .= qq~        href="$url&start=$next_hit">[next] ~ unless ($nh
        == $i); } }return $html;}
         1;
        @@ -224,4 +230,4 @@
         print WRITEIT "$site\n";
         close(WRITEIT);
         }
        -
        \ No newline at end of file
        +
        ---END
        Apply the patch as below:
        $ patch rxgoogle.cgi rxgoogle-xss.patch

- 漏洞信息 (23647)

RXGoogle.CGI 1.0/2.5 Cross Site Scripting Vulnerability (EDBID:23647)
cgi webapps
2004-02-04 Verified
0 Shaun Colley
N/A [点击下载]
source: http://www.securityfocus.com/bid/9575/info

The rxgoogle.cgi search script is prone to a cross-site scripting vulnerability because the software fails to sanitize user input and allows various metacharacters that may facilitate cross-site scripting attacks.

An attacker may leverage this issue to execute arbitrary code in the browser of an unsuspecting user in the context of the affected site. This may help the attacker steal cookie-based authentication credentials and launch other attacks.

http://www.example.com/cgi-bin/rxgoogle.cgi?query=%3Cscript%3Ealert%28%22XSS%22%29%3C%2Fscript%3E		

- 漏洞信息

3822
RxGoogle rxgoogle.cgi query XSS
Remote / Network Access Input Manipulation
Loss of Integrity

- 漏洞描述

rxgoogle.cgi contains a flaw that allows a remote cross site scripting attack. This flaw exists because the application does not validate the "query" variable upon submission to the rxgoogle.cgi script. This could allow a user to create a specially crafted URL that would execute arbitrary code in a user's browser within the trust relationship between the browser and the server, leading to a loss of integrity.

- 时间线

2004-02-04 Unknow
2004-02-04 Unknow

- 解决方案

Currently, there are no known workarounds or upgrades to correct this issue. However, the vulnerability reporter has released a patch to address this issue.

- 相关参考

- 漏洞作者

Unknown or Incomplete

- 漏洞信息

RXGoogle.CGI Cross Site Scripting Vulnerability
Input Validation Error 9575
Yes No
2004-02-04 12:00:00 2007-07-12 05:17:00
Discovery of this issue has been credited to Shaun Colley <shaunige@yahoo.co.uk>.

- 受影响的程序版本

rxgoogle.cgi rxgoogle.cgi 1.0
All Enthusiast Inc ReviewPost PHP Pro 2.5.1
All Enthusiast Inc ReviewPost PHP Pro 2.5
All Enthusiast Inc ReviewPost PHP Pro 1.0.2

- 漏洞讨论

The rxgoogle.cgi search script is prone to a cross-site scripting vulnerability because the software fails to sanitize user input and allows various metacharacters that may facilitate cross-site scripting attacks.

An attacker may leverage this issue to execute arbitrary code in the browser of an unsuspecting user in the context of the affected site. This may help the attacker steal cookie-based authentication credentials and launch other attacks.

- 漏洞利用

No exploit is required to leverage this issue. The following proof of concept has been provided:

http://www.example.com/cgi-bin/rxgoogle.cgi?query=%3Cscript%3Ealert%28%22XSS%22%29%3C%2Fscript%3E

- 解决方案

The following patch has been submitted by a third party and is untested:

----START
--- rxgoogle.cgi 2004-02-04 14:20:38.000000000 -0500
+++ test 2004-02-04 14:27:29.000000000 -0500
@@ -197,7 +197,13 @@
my $req = new HTTP::Request GET => "$url";
my $res = $ua->request($req);
if ($res->is_success) { $page_returned =
$res->content; } return $page_returned;}
-sub parse{my (@pairs, %in);my (@pairs, %in);my
($buffer, $pair, $name, $value);if
($ENV{'REQUEST_METHOD'} eq 'GET') {@pairs = split(/&/,
$ENV{'QUERY_STRING'});}elsif($ENV{'REQUEST_METHOD'} eq
'POST') {read(STDIN, $buffer,
$ENV{'CONTENT_LENGTH'});@pairs = split(/&/,
$buffer);}PAIR: foreach $pair (@pairs) {($name,
$value) = split(/=/, $pair);$name =~ tr/+/ /;$name =~
s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",
hex($1))/eg;$value =~ tr/+/ /;$value =~
s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",
hex($1))/eg;($value eq "---") and next PAIR;exists
$in{$name} ? ($in{$name} .= "~~$value") : ($in{$name}
= $value);}return %in;}
+
+# This parsing routine poorly sanitized user-input,
thus allowing injection
+# of metametachars, such as '<' and '>'. I have
patched the problem now, by
+# filtering input quite well now.
+#
+# -Shaun2k2
+sub parse{$OK_CHARS='-a-zA-Z0-9_.@'; my (@pairs,
%in);my (@pairs, %in);my ($buffer, $pair, $name,
$value);if ($ENV{'REQUEST_METHOD'} eq 'GET') {@pairs =
split(/&/,
$ENV{'QUERY_STRING'});}elsif($ENV{'REQUEST_METHOD'} eq
'POST') {read(STDIN, $buffer,
$ENV{'CONTENT_LENGTH'});@pairs = split(/&/,
$buffer);}PAIR: foreach $pair (@pairs) {($name,
$value) = split(/=/, $pair);$name =~ tr/+/ /;$name =~
s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",
hex($1))/eg;$name =~ s/[^$OK_CHARS]/_/go;$value =~
tr/+/ /;$value =~
s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",
hex($1))/eg;$value =~ s/[^$OK_CHARS]/_/go;($value eq
"---") and next PAIR;exists $in{$name} ? ($in{$name}
.= "~~$value") : ($in{$name} = $value);}return %in;}
sub html_navbar{my
($maxhits,$current,$numhits,$url)=0;my ($html, $nh,
$prev_hit, $next_hit, $left, $right, $first, $last,
$lower, $upper)="";$maxhits =shift; $numhits =shift;
$current =shift; $url =shift;
$nh=int($current/$maxhits)+1; $prev_hit=$nh-1;
$next_hit=$nh+1; if (($current + $maxhits) >=
$numhits) {$next_hit=0;}if ($numhits > $maxhits) {
$left = $nh; $right = int($numhits/$maxhits) -
$nh; ($left > 7) ? ($lower = $left -
7) : ($lower = 1); ($right > 7) ? ($upper = $nh
+ 7) : ($upper = int($numhits/$maxhits) + 1);
(7 - $nh >= 0) and ($upper = $upper + (8 - $nh));
($nh > ($numhits/$maxhits - 7)) and ($lower = $lower
- ($nh - int($numhits/$maxhits - 7) - 1));
$html = ""; ($nh > 1) and ($html .= qq~<a
href="$url&start=$prev_hit">[previous]</a> ~);
for ($i = 1; $i <= int($numhits/$maxhits) + 1; $i++) {
if ($i < $lower) { $html .= " ... "; $i =
($lower-1); next; } if ($i >
$upper) { $html .= " ... "; last; } ($i ==
$nh) ? ($html .= qq~$i ~) :
($html .= qq~<a href="$url&start=$i">$i</a> ~);
(($i * $maxhits) >= $numhits) and last;
}if ($next_hit) { $html .= qq~<a
href="$url&start=$next_hit">[next]</a> ~ unless ($nh
== $i); } }return $html;}

1;
@@ -224,4 +230,4 @@
print WRITEIT "$site\n";
close(WRITEIT);
}
-
\ No newline at end of file
+
---END


Apply the patch as below:

$ patch rxgoogle.cgi rxgoogle-xss.patch

- 相关参考

 

 

关于SCAP中文社区

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

版权声明

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