Fortinet FortiWeb 5.x < 5.2.1 Multiple XSS Vulnerabilities

2014-08-15T00:00:00
ID FORTIWEB_FG-IR-14-012.NASL
Type nessus
Reporter Tenable
Modified 2018-11-15T00:00:00

Description

The remote host is running FortiWeb 5.x prior to 5.2.1. It is, therefore, affected by multiple cross-site scripting (XSS) vulnerabilities in the web management interface URLs '/user/ldap_user/check_dlg' and '/user/radius_user/check_dlg' due to insufficient parameter input validation. Under specific conditions, a remote attacker could execute arbitrary JavaScript code within an administrative browser session.

                                        
                                            #
# (C) Tenable Network Security, Inc.
#

include("compat.inc");

if (description)
{
  script_id(77220);
  script_version("1.6");
  script_cvs_date("Date: 2018/11/15 20:50:19");

  script_cve_id("CVE-2014-4738");
  script_bugtraq_id(68528);

  script_name(english:"Fortinet FortiWeb 5.x < 5.2.1 Multiple XSS Vulnerabilities");
  script_summary(english:"Checks the version of FortiWeb.");

  script_set_attribute(attribute:"synopsis", value:
"The remote host is affected by multiple cross-site scripting
vulnerabilities.");
  script_set_attribute(attribute:"description", value:
"The remote host is running FortiWeb 5.x prior to 5.2.1. It is,
therefore, affected by multiple cross-site scripting (XSS)
vulnerabilities in the web management interface URLs
'/user/ldap_user/check_dlg' and '/user/radius_user/check_dlg' due to
insufficient parameter input validation. Under specific conditions, a
remote attacker could execute arbitrary JavaScript code within an
administrative browser session.");
  script_set_attribute(attribute:"see_also", value:"https://fortiguard.com/psirt/FG-IR-14-012");
  script_set_attribute(attribute:"solution", value:"Upgrade to Fortinet FortiWeb version 5.2.1 or later.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:N/I:P/A:N");
  script_set_cvss_temporal_vector("CVSS2#E:H/RL:OF/RC:C");
  script_set_attribute(attribute:"exploitability_ease", value:"No exploit is required");
  script_set_attribute(attribute:"exploit_available", value:"false");
  script_cwe_id(20, 74, 79, 442, 629, 711, 712, 722, 725, 750, 751, 800, 801, 809, 811, 864, 900, 928, 931, 990);

  script_set_attribute(attribute:"vuln_publication_date", value:"2014/07/10");
  script_set_attribute(attribute:"patch_publication_date", value:"2014/07/10");
  script_set_attribute(attribute:"plugin_publication_date", value:"2014/08/15");

  script_set_attribute(attribute:"plugin_type", value:"local");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:fortinet:fortiweb");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_family(english:"CGI abuses : XSS");

  script_copyright(english:"This script is Copyright (C) 2014-2018 Tenable Network Security, Inc.");

  script_dependencies("fortinet_version.nbin");
  script_require_keys("Host/Fortigate/model", "Host/Fortigate/version");

  exit(0);
}

include("audit.inc");
include("global_settings.inc");
include("misc_func.inc");

app_name = "FortiWeb";
model = get_kb_item_or_exit("Host/Fortigate/model");
version = get_kb_item_or_exit("Host/Fortigate/version");
fix = '5.2.1';

# Make sure device is FortiWeb.
if (tolower(app_name) >!< tolower(model)) audit(AUDIT_HOST_NOT, "a " + app_name + " device"); 

# Versions 5.0.x, 5.1.x and 5.2.0
if (
  ver_compare(ver:version, fix:'5.0', strict:FALSE) >= 0 &&
  ver_compare(ver:version, fix:fix, strict:FALSE) == -1)
{
  port = 0;
  set_kb_item(name:"www/"+port+"/XSS", value:TRUE);
  if (report_verbosity > 0)
  {
    report =
      '\n  Model             : ' + model +
      '\n  Installed version : ' + version +
      '\n  Fixed version     : ' + fix +
      '\n';

    security_warning(extra:report, port:port);
  }
  else security_warning(port:port);
  exit(0);
}
else audit(AUDIT_INST_VER_NOT_VULN, app_name, version);