###############################################################################
# OpenVAS Vulnerability Test
# $Id: secpod_google_chrome_getsvgdocument_xss_vuln.nasl 4892 2009-09-22 17:45:29Z sep $
#
# Google Chrome 'getSVGDocument' Cross-Site Scripting Vulnerability
#
# Authors:
# Sharath S <sharaths@secpod.com>
#
# Copyright:
# Copyright (c) 2009 SecPod, http://www.secpod.com
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2
# (or any later version), as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
###############################################################################

if(description)
{
  script_id(900860);
  script_version("$Revision: 1.0 $");
  script_tag(name:"cvss_base", value:"4.3");
  script_tag(name:"risk_factor", value:"Medium");
  script_cve_id("CVE-2009-3264");
  script_bugtraq_id(36416);
  script_name("Google Chrome 'getSVGDocument' Cross-Site Scripting Vulnerability");
  desc = "
  Overview: This host is installed with Google Chrome and is prone to Cross-Site
  Scripting vulnerability.

  Vulnerability Insight:
  Error exists when 'getSVGDocument' method omits an unspecified access check
  which can be exploited by remote web servers to bypass the Same Origin
  Policy and conduct XSS attacks via unknown vectors.

  Impact:
  Successful exploitation will let the remote attackers to conduct XSS attacks
  on the victim's system via SVG document.

  Impact Level: Application

  Affected Software/OS:
  Google Chrome version prior to 3.0.195.21 on Windows.

  Fix: Upgrade to Google Chrom version 3.0.195.21 or later
  http://www.google.com/chrome

  References:
  http://secunia.com/advisories/36770
  http://code.google.com/p/chromium/issues/detail?id=21338
  http://googlechromereleases.blogspot.com/2009/09/stable-channel-update.html

  CVSS Score:
    CVSS Base Score     : 4.3 (AV:N/AC:M/Au:NR/C:N/I:P/A:N)
    CVSS Temporal Score : 3.2
  Risk factor: Medium";

  script_description(desc);
  script_summary("Check for the version of Google Chrome");
  script_category(ACT_GATHER_INFO);
  script_copyright("Copyright (C) 2009 SecPod");
  script_family("Web application abuses");
  script_dependencies("gb_google_chrome_detect_win.nasl");
  script_require_keys("GoogleChrome/Win/Ver");
  exit(0);
}


include("version_func.inc");

chromeVer = get_kb_item("GoogleChrome/Win/Ver");
if(!chromeVer){
  exit(0);
}

# Check for Google Chrome version < 3.0.195.21
if(version_is_less(version:chromeVer, test_version:"3.0.195.21")){
  security_warning(0);
}
