CVSS2
Attack Vector
NETWORK
Attack Complexity
MEDIUM
Authentication
NONE
Confidentiality Impact
NONE
Integrity Impact
PARTIAL
Availability Impact
NONE
AV:N/AC:M/Au:N/C:N/I:P/A:N
EPSS
Percentile
54.5%
The version of Dolibarr on the remote host fails to properly sanitize parameters in ‘admin/company.php’ before using them to generate dynamic HTML.
By tricking someone into clicking on a specially crafted link, an attacker may be able exploit this issue to inject arbitrary HTML and script code in a user’s browser to be executed within the security context of the affected site.
Note that this install is likely affected by other XSS vulnerabilities as well.
#%NASL_MIN_LEVEL 70300
#
# (C) Tenable Network Security, Inc.
#
include('deprecated_nasl_level.inc');
include('compat.inc');
if (description)
{
script_id(58747);
script_version("1.7");
script_set_attribute(attribute:"plugin_modification_date", value:"2022/04/11");
script_cve_id("CVE-2011-4329");
script_bugtraq_id(50617);
script_name(english:"Dolibarr 3.1.0 admin/company.php username Parameter XSS");
script_set_attribute(attribute:"synopsis", value:
"The remote web server contains a PHP script that is vulnerable to a
reflected cross-site scripting attack.");
script_set_attribute(attribute:"description", value:
"The version of Dolibarr on the remote host fails to properly sanitize
parameters in 'admin/company.php' before using them to generate
dynamic HTML.
By tricking someone into clicking on a specially crafted link, an
attacker may be able exploit this issue to inject arbitrary HTML and
script code in a user's browser to be executed within the security
context of the affected site.
Note that this install is likely affected by other XSS vulnerabilities
as well.");
# https://github.com/Dolibarr/dolibarr/commit/762f98ab4137749d0993612b4e3544a4207e78a1
script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?82be0b1a");
script_set_attribute(attribute:"see_also", value:"https://doliforge.org/tracker/?func=detail&aid=232&group_id=144");
script_set_attribute(attribute:"solution", value:
"Upgrade to Dolibarr 3.1.1 or apply the linked patches from the vendor.");
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:"2011/11/09");
script_set_attribute(attribute:"patch_publication_date", value:"2011/11/09");
script_set_attribute(attribute:"plugin_publication_date", value:"2012/04/13");
script_set_attribute(attribute:"plugin_type", value:"remote");
script_set_attribute(attribute:"cpe", value:"cpe:/a:dolibarr:dolibarr");
script_set_attribute(attribute:"thorough_tests", value:"true");
script_end_attributes();
script_category(ACT_ATTACK);
script_family(english:"CGI abuses : XSS");
script_copyright(english:"This script is Copyright (C) 2012-2022 Tenable Network Security, Inc.");
script_dependencies("dolibarr_detect.nasl");
script_require_keys("www/PHP", "www/dolibarr");
script_exclude_keys("Settings/disable_cgi_scanning");
script_require_ports("Services/www", 80);
exit(0);
}
include("audit.inc");
include("global_settings.inc");
include("misc_func.inc");
include("http.inc");
include("url_func.inc");
include("webapp_func.inc");
port = get_http_port(default:80, php:TRUE, embedded:0);
install = get_install_from_kb(appname:'dolibarr', port:port, exit_on_fail:TRUE);
dir = install['dir'];
xss = "<script>alert('" + SCRIPT_NAME + "')</script>";
exploit = 'username=%22%3E' + urlencode(str:xss) + '%3Ca%20href=%22';
vuln_script = '/admin/company.php';
res = test_cgi_xss(
port: port,
dirs: make_list(dir),
cgi: vuln_script,
qs: exploit,
pass_str: '>' + xss + '<',
ctrl_re: 'loginfunction'
);
if (res == 0)
exit(0, "The Dolibarr install at " + build_url(qs:dir, port:port) + " is not affected.");