VMware vCenter Server < 7.0 U2c Multiple Vulnerabilities (VMSA-2021-0020) - Nessus

High   Plugin ID: 153545

This page contains detailed information about the VMware vCenter Server < 7.0 U2c Multiple Vulnerabilities (VMSA-2021-0020) Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 153545
Name: VMware vCenter Server < 7.0 U2c Multiple Vulnerabilities (VMSA-2021-0020)
Filename: vmware_vcenter_70_u2c_vmsa-2021-0020.nasl
Vulnerability Published: 2021-09-21
This Plugin Published: 2021-09-22
Last Modification Time: 2022-01-20
Plugin Version: 1.9
Plugin Type: remote
Plugin Family: Misc.
Dependencies: vmware_vcenter_detect.nbin
Required KB Items [?]: Host/VMware/release, Host/VMware/vCenter, Host/VMware/version

Vulnerability Information


Severity: High
Vulnerability Published: 2021-09-21
Patch Published: 2021-09-21
CVE [?]: CVE-2021-21991, CVE-2021-21992, CVE-2021-21993, CVE-2021-22005, CVE-2021-22006, CVE-2021-22007, CVE-2021-22008, CVE-2021-22009, CVE-2021-22010, CVE-2021-22014, CVE-2021-22015, CVE-2021-22019, CVE-2021-22020
CPE [?]: cpe:/a:vmware:vcenter_server

Synopsis

A virtualization management application installed on the remote host is affected by multiple vulnerabilities.

Description

The version of VMware vCenter Server installed on the remote host is 7.0 prior to 7.0 U2c. It is, therefore, affected by multiple vulnerabilities:

- An arbitrary file upload vulnerability exists in the analytics service of vSphere Server. An unauthenticated, remote attacker can exploit this to upload arbitrary files on the remote host and execute code using a specially crafted file. (CVE-2021-22005)

- A privilege escalation vulnerability exists in vCenter Server due to the way it handles session tokens. An authenticated, local attacker can exploit this to gain unauthorized access to the system. (CVE-2021-21991, CVE-2021-22015)

- A reverse proxy bypass vulnerability exists in vCenter Server due to the way the endpoints handle the URI. An unauthenticated, remote attacker can exploit this to gain unauthorized access to restricted endpoints. (CVE-2021-22006)

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

Solution

Upgrade to VMware vCenter Server 7.0 U2c or later or apply the workaround mentioned in the advisory.

Public Exploits


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

Here's the list of publicly known exploits and PoCs for verifying the VMware vCenter Server < 7.0 U2c Multiple Vulnerabilities (VMSA-2021-0020) vulnerability:

  1. Metasploit: exploit/linux/http/vmware_vcenter_analytics_file_upload
    [VMware vCenter Server Analytics (CEIP) Service File Upload]
  2. GitHub: https://github.com/HynekPetrak/HynekPetrak
    [CVE-2021-21991]
  3. GitHub: https://github.com/AIPOCAI/CVE-2021-21993
    [CVE-2021-21993: PoC for exploiting CVE-2021-21993 : The vCenter Server contains an SSRF (Server Side ...]
  4. GitHub: https://github.com/1ZRR4H/CVE-2021-22005
    [CVE-2021-22005]
  5. GitHub: https://github.com/5gstudent/CVE-2021-22005-
    [CVE-2021-22005]
  6. GitHub: https://github.com/AIPOCAI/CVE-2021-22005
    [CVE-2021-22005: PoC for exploiting CVE-2021-22005 : The vCenter Server contains an arbitrary file ...]
  7. GitHub: https://github.com/CHYbeta/Vuln100Topics20
    [CVE-2021-22005]
  8. GitHub: https://github.com/FDlucifer/firece-fish
    [CVE-2021-22005]
  9. GitHub: https://github.com/Mr-xn/Penetration_Testing_POC
    [CVE-2021-22005]
  10. GitHub: https://github.com/RedTeamExp/CVE-2021-22005_PoC
    [CVE-2021-22005]
  11. GitHub: https://github.com/TheTh1nk3r/exp_hub
    [CVE-2021-22005]
  12. GitHub: https://github.com/TiagoSergio/CVE-2021-22005
    [CVE-2021-22005]
  13. GitHub: https://github.com/Timirepo/CVE_Exploits
    [CVE-2021-22005]
  14. GitHub: https://github.com/Vulnmachines/VmWare-vCenter-vulnerability
    [CVE-2021-22005]
  15. GitHub: https://github.com/X1pe0/VMWare-CVE-Check
    [CVE-2021-22005]
  16. GitHub: https://github.com/chaosec2021/CVE-2021-22005poc
    [CVE-2021-22005: CVE-2021-22005 vcenter任意文件上传批量验证poc]
  17. GitHub: https://github.com/hanc00l/some_pocsuite
    [CVE-2021-22005]
  18. GitHub: https://github.com/nday-ldgz/ZoomEye-dork
    [CVE-2021-22005]
  19. GitHub: https://github.com/pisut4152/Sigma-Rule-for-CVE-2021-22005-scanning-activity
    [CVE-2021-22005]
  20. GitHub: https://github.com/r0eXpeR/supplier
    [CVE-2021-22005]
  21. GitHub: https://github.com/rwincey/CVE-2021-22005
    [CVE-2021-22005]
  22. GitHub: https://github.com/shmilylty/cve-2021-22005-exp
    [CVE-2021-22005]
  23. GitHub: https://github.com/timb-machine-mirrors/CVE-2021-22005
    [CVE-2021-22005]
  24. GitHub: https://github.com/viksafe/Get-vSphereVersion
    [CVE-2021-22005]
  25. GitHub: https://github.com/PenteraIO/vScalation-CVE-2021-22015
    [CVE-2021-22015]
  26. GitHub: https://github.com/cloudbyteelias/CVE-2021-41773
    [CVE-2021-22015]
  27. GitHub: https://github.com/Jun-5heng/CVE-2021-22005
    [CVE-2021-22005: VMware vCenter Server任意文件上传漏洞 / Code By:Jun_sheng]
  28. GitHub: https://github.com/r0ckysec/CVE-2021-22005
    [CVE-2021-22005: CVE-2021-22005 - VMWare vCenter Server File Upload to RCE]
  29. GitHub: https://github.com/TaroballzChen/CVE-2021-22005-metasploit
    [CVE-2021-22005: the metasploit script(POC/EXP) about CVE-2021-22005 VMware vCenter Server contains ...]

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.

WARNING: Beware of using unverified exploits from sources such as GitHub or Exploit-DB. These exploits and PoCs could contain malware. For more information, see how to use exploits safely.

Risk Information


CVSS Score Source [?]: CVE-2021-22014
CVSS V2 Vector: AV:N/AC:L/Au:S/C:C/I:C/A:C/E:H/RL:OF/RC:C
CVSS Base Score:9.0 (High)
Impact Subscore:10.0
Exploitability Subscore:8.0
CVSS Temporal Score:7.8 (High)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:7.8 (High)
CVSS V3 Vector: CVSS:3.0/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H/E:H/RL:O/RC:C
CVSS Base Score:7.2 (High)
Impact Subscore:5.9
Exploitability Subscore:1.2
CVSS Temporal Score:6.9 (Medium)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:6.9 (Medium)
STIG Severity [?]: I
STIG Risk Rating: High

Go back to menu.

Plugin Source


This is the vmware_vcenter_70_u2c_vmsa-2021-0020.nasl nessus plugin source code. This script is Copyright (C) 2021-2022 and is owned by Tenable, Inc. or an Affiliate thereof.

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

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

if (description)
{
  script_id(153545);
  script_version("1.9");
  script_set_attribute(attribute:"plugin_modification_date", value:"2022/01/20");

  script_cve_id(
    "CVE-2021-21991",
    "CVE-2021-21992",
    "CVE-2021-21993",
    "CVE-2021-22005",
    "CVE-2021-22006",
    "CVE-2021-22007",
    "CVE-2021-22008",
    "CVE-2021-22009",
    "CVE-2021-22010",
    "CVE-2021-22014",
    "CVE-2021-22015",
    "CVE-2021-22019",
    "CVE-2021-22020"
  );
  script_xref(name:"IAVA", value:"2021-A-0434");
  script_xref(name:"CISA-KNOWN-EXPLOITED", value:"2021/11/17");

  script_name(english:"VMware vCenter Server < 7.0 U2c Multiple Vulnerabilities (VMSA-2021-0020)");

  script_set_attribute(attribute:"synopsis", value:
"A virtualization management application installed on the remote host is affected by multiple vulnerabilities.");
  script_set_attribute(attribute:"description", value:
"The version of VMware vCenter Server installed on the remote host is 7.0 prior to 7.0 U2c. It is, therefore, affected
 by multiple vulnerabilities:

    - An arbitrary file upload vulnerability exists in the analytics service of vSphere Server. An 
      unauthenticated, remote attacker can exploit this to upload arbitrary files on the remote host 
      and execute code using a specially crafted file. (CVE-2021-22005)

    - A privilege escalation vulnerability exists in vCenter Server due to the way it handles session tokens. 
      An authenticated, local attacker can exploit this to gain unauthorized access to the system. 
      (CVE-2021-21991, CVE-2021-22015)

    - A reverse proxy bypass vulnerability exists in vCenter Server due to the way the endpoints handle the URI. 
      An unauthenticated, remote attacker can exploit this to gain unauthorized access to restricted endpoints.
      (CVE-2021-22006) 

Note that Nessus has not tested for this issue but has instead relied only on the application's self-reported version   
number. Nessus has also not tested for the presence of a workaround.");
  script_set_attribute(attribute:"see_also", value:"https://www.vmware.com/security/advisories/VMSA-2021-0020.html");
  script_set_attribute(attribute:"solution", value:
"Upgrade to VMware vCenter Server 7.0 U2c or later or apply the workaround mentioned in the advisory.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:S/C:C/I:C/A:C");
  script_set_cvss_temporal_vector("CVSS2#E:H/RL:OF/RC:C");
  script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H");
  script_set_cvss3_temporal_vector("CVSS:3.0/E:H/RL:O/RC:C");
  script_set_attribute(attribute:"cvss_score_source", value:"CVE-2021-22014");

  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:'VMware vCenter Server Analytics (CEIP) Service File Upload');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");

  script_set_attribute(attribute:"vuln_publication_date", value:"2021/09/21");
  script_set_attribute(attribute:"patch_publication_date", value:"2021/09/21");
  script_set_attribute(attribute:"plugin_publication_date", value:"2021/09/22");

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

  script_category(ACT_GATHER_INFO);
  script_family(english:"Misc.");

  script_copyright(english:"This script is Copyright (C) 2021-2022 and is owned by Tenable, Inc. or an Affiliate thereof.");

  script_dependencies("vmware_vcenter_detect.nbin");
  script_require_keys("Host/VMware/vCenter", "Host/VMware/version", "Host/VMware/release");
  script_require_ports("Services/www", 80, 443);

  exit(0);
}

var fixes = make_array(
  '7.0', '18356314'  # 7.0 U2c
);

var port = get_kb_item_or_exit('Host/VMware/vCenter');
var version = get_kb_item_or_exit('Host/VMware/version');
var release = get_kb_item_or_exit('Host/VMware/release');

# Extract and verify the build number
var build = ereg_replace(pattern:"^VMware vCenter Server [0-9\\.]+ build-([0-9]+)$", string:release, replace:"\1");
if (build !~ "^[0-9]+$") audit(AUDIT_UNKNOWN_BUILD, 'VMware vCenter 7.0');

var match = pregmatch(pattern:"^VMware vCenter ([0-9]+\.[0-9]+).*$", string:version);
if (isnull(match)) audit(AUDIT_OS_NOT, 'VMware vCenter 7.0');

var ver = match[1];
if (ver !~ "^7\.0$") audit(AUDIT_OS_NOT, 'VMware vCenter 7.0');

var fixed_build = int(fixes[ver]);
if (empty_or_null(fixed_build)) audit(AUDIT_VER_FORMAT, ver);

release = release - 'VMware vCenter Server ';
if (build >= fixed_build)
  audit(AUDIT_LISTEN_NOT_VULN, 'VMware vCenter', port, release);

var report =  '\n  VMware vCenter version    : ' + ver +
              '\n  Installed build           : ' + build +
              '\n  Fixed build               : ' + fixed_build +
              '\n';

security_report_v4(port:port, severity:SECURITY_HOLE, extra:report);

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

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

Go back to menu.

How to Run


Here is how to run the VMware vCenter Server < 7.0 U2c Multiple Vulnerabilities (VMSA-2021-0020) 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 Misc. plugin family.
  6. On the right side table select VMware vCenter Server < 7.0 U2c Multiple Vulnerabilities (VMSA-2021-0020) plugin ID 153545.
  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 vmware_vcenter_70_u2c_vmsa-2021-0020.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a vmware_vcenter_70_u2c_vmsa-2021-0020.nasl -t <IP/HOST>

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

/opt/nessus/bin/nasl -T - vmware_vcenter_70_u2c_vmsa-2021-0020.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 vmware_vcenter_70_u2c_vmsa-2021-0020.nasl -t <IP/HOST>

Go back to menu.

References


IAVA | Information Assurance Vulnerability Alert:
  • 2021-A-0434
See also: Similar and related Nessus plugins:
  • 153547 - VMware vCenter Server < 6.5 U3q Multiple Vulnerabilities (VMSA-2021-0020)
  • 153544 - VMware vCenter Server < 6.7 Multiple Vulnerabilities (VMSA-2021-0020)
  • 153889 - VMware vCenter Server Arbitrary File Upload (VMSA-2021-0020)
  • 151049 - OracleVM 3.4 : xen (OVMSA-2021-0020)

Version


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

Go back to menu.