Nagios XI < 5.8.5 Multiple Vulnerabilities - Nessus

Critical   Plugin ID: 153612

This page contains detailed information about the Nagios XI < 5.8.5 Multiple Vulnerabilities Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 153612
Name: Nagios XI < 5.8.5 Multiple Vulnerabilities
Filename: nagiosxi_5_8_5.nasl
Vulnerability Published: 2021-07-15
This Plugin Published: 2021-09-24
Last Modification Time: 2022-02-14
Plugin Version: 1.3
Plugin Type: remote
Plugin Family: CGI abuses
Dependencies: nagios_enterprise_detect.nasl
Required KB Items [?]: installed_sw/nagios_xi

Vulnerability Information


Severity: Critical
Vulnerability Published: 2021-07-15
Patch Published: 2021-07-15
CVE [?]: CVE-2021-33177, CVE-2021-33179, CVE-2021-36363, CVE-2021-36364, CVE-2021-36365, CVE-2021-36366, CVE-2021-37343, CVE-2021-37345, CVE-2021-37347, CVE-2021-37348, CVE-2021-37349, CVE-2021-37350, CVE-2021-37351, CVE-2021-37352
CPE [?]: cpe:/a:nagios:nagios_xi

Synopsis

The remote host has a web application affected by multiple vulnerabilities.

Description

According to the self-reported version of Nagios XI, the remote host is affected by multiple vulnerabilities, including the following:

- A path traversal vulnerability exists in Nagios XI below version 5.8.5 AutoDiscovery component and could lead to post authenticated RCE under security context of the user running Nagios. (CVE-2021-37343)

- Nagios XI before version 5.8.5 is vulnerable to local privilege escalation because xi-sys.cfg is being imported from the var directory for some scripts with elevated permissions. (CVE-2021-37345)

- Nagios XI before version 5.8.5 is vulnerable to SQL injection vulnerability in Bulk Modifications Tool due to improper input sanitisation. (CVE-2021-37350)

Note that Nessus has not tested for this issue but has instead relied only on the application's self-reported version number.

Solution

Upgrade to Nagios XI 5.8.5 or later.

Public Exploits


Target Network Port(s): 80
Target Asset(s): Services/www
Exploit Available: True (Metasploit Framework)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the Nagios XI < 5.8.5 Multiple Vulnerabilities vulnerability:

  1. Metasploit: exploit/linux/http/nagios_xi_autodiscovery_webshell
    [Nagios XI Autodiscovery Webshell Upload]
  2. Metasploit: auxiliary/scanner/http/nagios_xi_scanner
    [Nagios XI Scanner]

Before running any exploit against any system, make sure you are authorized by the owner of the target system(s) to perform such activity. In any other case, this would be considered as an illegal activity.

Risk Information


CVSS Score Source [?]: CVE-2021-37350
CVSS V2 Vector: AV:N/AC:L/Au:N/C:P/I:P/A:P/E:F/RL:OF/RC:C
CVSS Base Score:7.5 (High)
Impact Subscore:6.4
Exploitability Subscore:10.0
CVSS Temporal Score:6.2 (Medium)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:6.2 (Medium)
CVSS V3 Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:F/RL:O/RC:C
CVSS Base Score:9.8 (Critical)
Impact Subscore:5.9
Exploitability Subscore:3.9
CVSS Temporal Score:9.1 (Critical)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:9.1 (Critical)
STIG Severity [?]: I
STIG Risk Rating: High

Go back to menu.

Plugin Source


This is the nagiosxi_5_8_5.nasl nessus plugin source code. This script is Copyright (C) 2021-2022 Tenable Network Security, Inc.

#%NASL_MIN_LEVEL 70300
##
# (C) Tenable Network Security, Inc.
##

include('deprecated_nasl_level.inc');
include('compat.inc');

if (description)
{
  script_id(153612);
  script_version("1.3");
  script_set_attribute(attribute:"plugin_modification_date", value:"2022/02/14");

  script_cve_id(
    "CVE-2021-33177",
    "CVE-2021-33179",
    "CVE-2021-36363",
    "CVE-2021-36364",
    "CVE-2021-36365",
    "CVE-2021-36366",
    "CVE-2021-37343",
    "CVE-2021-37345",
    "CVE-2021-37347",
    "CVE-2021-37348",
    "CVE-2021-37349",
    "CVE-2021-37350",
    "CVE-2021-37351",
    "CVE-2021-37352"
  );
  script_xref(name:"IAVB", value:"2021-B-0053");

  script_name(english:"Nagios XI < 5.8.5 Multiple Vulnerabilities");

  script_set_attribute(attribute:"synopsis", value:
"The remote host has a web application affected by multiple vulnerabilities.");
  script_set_attribute(attribute:"description", value:
"According to the self-reported version of Nagios XI, the remote host is affected by multiple vulnerabilities, including
the following:

  - A path traversal vulnerability exists in Nagios XI below version 5.8.5 AutoDiscovery component and could lead to post 
    authenticated RCE under security context of the user running Nagios. (CVE-2021-37343)

  - Nagios XI before version 5.8.5 is vulnerable to local privilege escalation because xi-sys.cfg is being imported from 
    the var directory for some scripts with elevated permissions. (CVE-2021-37345)

  - Nagios XI before version 5.8.5 is vulnerable to SQL injection vulnerability in Bulk Modifications Tool due to improper 
    input sanitisation. (CVE-2021-37350)

Note that Nessus has not tested for this issue but has instead relied only on the application's self-reported version
number.");
  script_set_attribute(attribute:"see_also", value:"https://www.nagios.com/downloads/nagios-xi/change-log/");
  script_set_attribute(attribute:"see_also", value:"https://www.nagios.com/products/security/");
  script_set_attribute(attribute:"solution", value:
"Upgrade to Nagios XI 5.8.5 or later.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
  script_set_cvss_temporal_vector("CVSS2#E:F/RL:OF/RC:C");
  script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H");
  script_set_cvss3_temporal_vector("CVSS:3.0/E:F/RL:O/RC:C");
  script_set_attribute(attribute:"cvss_score_source", value:"CVE-2021-37350");

  script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"true");
  script_set_attribute(attribute:"metasploit_name", value:'Nagios XI Autodiscovery Webshell Upload');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");

  script_set_attribute(attribute:"vuln_publication_date", value:"2021/07/15");
  script_set_attribute(attribute:"patch_publication_date", value:"2021/07/15");
  script_set_attribute(attribute:"plugin_publication_date", value:"2021/09/24");

  script_set_attribute(attribute:"plugin_type", value:"remote");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:nagios:nagios_xi");
  script_set_attribute(attribute:"stig_severity", value:"I");
  script_end_attributes();

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

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

  script_dependencies("nagios_enterprise_detect.nasl");
  script_require_keys("installed_sw/nagios_xi");
  script_require_ports("Services/www", 80);

  exit(0);
}

include('http_func.inc');
include('vcf_extras.inc');

var app = 'nagios_xi';

# Get the ports that web servers have been found on.
var port = get_http_port(default:80, embedded:TRUE);

var app_info = vcf::nagiosxi::get_app_info(port:port);

var constraints = [
    {'fixed_version': '5.8.5'}
];

vcf::nagiosxi::check_version_and_report(app_info:app_info, constraints:constraints, severity:SECURITY_HOLE, default_fix:'5.8.5');

The latest version of this script can be found in these locations depending on your platform:

  • Linux / Unix:
    /opt/nessus/lib/nessus/plugins/nagiosxi_5_8_5.nasl
  • Windows:
    C:\ProgramData\Tenable\Nessus\nessus\plugins\nagiosxi_5_8_5.nasl
  • Mac OS X:
    /Library/Nessus/run/lib/nessus/plugins/nagiosxi_5_8_5.nasl

Go back to menu.

How to Run


Here is how to run the Nagios XI < 5.8.5 Multiple Vulnerabilities as a standalone plugin via the Nessus web user interface (https://localhost:8834/):

  1. Click to start a New Scan.
  2. Select Advanced Scan.
  3. Navigate to the Plugins tab.
  4. On the top right corner click to Disable All plugins.
  5. On the left side table select CGI abuses plugin family.
  6. On the right side table select Nagios XI < 5.8.5 Multiple Vulnerabilities plugin ID 153612.
  7. Specify the target on the Settings tab and click to Save the scan.
  8. Run the scan.

Here are a few examples of how to run the plugin in the command line. Note that the examples below demonstrate the usage on the Linux / Unix platform.

Basic usage:

/opt/nessus/bin/nasl nagiosxi_5_8_5.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a nagiosxi_5_8_5.nasl -t <IP/HOST>

Run the plugin with trace script execution written to the console (useful for debugging):

/opt/nessus/bin/nasl -T - nagiosxi_5_8_5.nasl -t <IP/HOST>

Run the plugin with using a state file for the target and updating it (useful for running multiple plugins on the target):

/opt/nessus/bin/nasl -K /tmp/state nagiosxi_5_8_5.nasl -t <IP/HOST>

Go back to menu.

References


IAVB | Information Assurance Vulnerability Bulletin:
  • 2021-B-0053
See also: Similar and related Nessus plugins:
  • 154935 - Nagios XI < 5.6.6 RCE
  • 157377 - Nagios XI 5.7.5 Command Injection
  • 150056 - Nagios XI < 5.7 Code Injection
  • 63563 - Nagios Core history.cgi Multiple Parameter Buffer Overflow
  • 66361 - Nagios NRPE nrpe.c Arbitrary Command Execution
  • 73757 - Nagios NRPE Command Argument Processing Enabled
  • 49773 - Default Password (nagiosxi) for 'root' Account

Version


This page has been produced using Nessus Professional 10.1.2 (#68) LINUX, Plugin set 202205072148.
Plugin file nagiosxi_5_8_5.nasl version 1.3. For more plugins, visit the Nessus Plugin Library.

Go back to menu.