VMware vCenter Server 6.5 / 6.7 / 7.0 Multiple Vulnerabilities (VMSA-2021-0002) - Nessus

Critical   Plugin ID: 146826

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

Plugin Overview


ID: 146826
Name: VMware vCenter Server 6.5 / 6.7 / 7.0 Multiple Vulnerabilities (VMSA-2021-0002)
Filename: vmware_vcenter_vmsa-2021-0002.nasl
Vulnerability Published: 2021-02-23
This Plugin Published: 2021-02-25
Last Modification Time: 2022-03-08
Plugin Version: 1.10
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: Critical
Vulnerability Published: 2021-02-23
Patch Published: 2021-02-23
CVE [?]: CVE-2021-21972, CVE-2021-21973
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 6.5 prior to 6.5 U3n, 6.7 prior to 6.7 U3l or 7.0 prior to 7.0 U1c. It is, therefore, affected by multiple vulnerabilities, as follows:

- The vSphere Client (HTML5) contains a remote code execution vulnerability in a vCenter Server plugin. A malicious actor with network access to port 443 may exploit this issue to execute commands with unrestricted privileges on the underlying operating system that hosts vCenter Server. This affects VMware vCenter Server (7.x before 7.0 U1c, 6.7 before 6.7 U3l and 6.5 before 6.5 U3n) and VMware Cloud Foundation (4.x before 4.2 and 3.x before 3.10.1.2). (CVE-2021-21972)

- The vSphere Client (HTML5) contains an SSRF (Server Side Request Forgery) vulnerability due to improper validation of URLs in a vCenter Server plugin. A malicious actor with network access to port 443 may exploit this issue by sending a POST request to vCenter Server plugin leading to information disclosure. This affects: VMware vCenter Server (7.x before 7.0 U1c, 6.7 before 6.7 U3l and 6.5 before 6.5 U3n) and VMware Cloud Foundation (4.x before 4.2 and 3.x before 3.10.1.2). (CVE-2021-21973)

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 6.5 U3n, 6.7 U3l, 7.0 U1c 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, Exploit-DB, GitHub)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the VMware vCenter Server 6.5 / 6.7 / 7.0 Multiple Vulnerabilities (VMSA-2021-0002) vulnerability:

  1. Metasploit: exploit/multi/http/vmware_vcenter_uploadova_rce
    [VMware vCenter Server Unauthenticated OVA File Upload RCE]
  2. Exploit-DB: exploits/multiple/webapps/49602.py
    [EDB-49602: VMware vCenter Server 7.0 - Unauthenticated File Upload]
  3. Exploit-DB: exploits/multiple/webapps/50056.py
    [EDB-50056: VMware vCenter Server 7.0 - Remote Code Execution (RCE) (Unauthenticated)]
  4. GitHub: https://github.com/0ps/pocassistdb
    [CVE-2021-21972]
  5. GitHub: https://github.com/DaveCrown/vmware-kb82374
    [CVE-2021-21972]
  6. GitHub: https://github.com/DougCarroll/CVE_2021_21972
    [CVE-2021-21972]
  7. GitHub: https://github.com/EdgeSecurityTeam/Vulnerability
    [CVE-2021-21972]
  8. GitHub: https://github.com/JMousqueton/Detect-CVE-2021-21972
    [CVE-2021-21972]
  9. GitHub: https://github.com/L-pin/CVE-2021-21972
    [CVE-2021-21972]
  10. GitHub: https://github.com/Mr-xn/Penetration_Testing_POC
    [CVE-2021-21972]
  11. GitHub: https://github.com/QmF0c3UK/CVE-2021-21972-vCenter-6.5-7.0-RCE-POC
    [CVE-2021-21972]
  12. GitHub: https://github.com/SexyBeast233/SecBooks
    [CVE-2021-21972]
  13. GitHub: https://github.com/SouthWind0/southwind0.github.io
    [CVE-2021-21972]
  14. GitHub: https://github.com/Vulnmachines/VmWare-vCenter-vulnerability
    [CVE-2021-21972]
  15. GitHub: https://github.com/Whitehorse-rainbow/-Infiltration-summary
    [CVE-2021-21972]
  16. GitHub: https://github.com/alt3kx/CVE-2021-21972
    [CVE-2021-21972]
  17. GitHub: https://github.com/bhassani/Recent-CVE
    [CVE-2021-21972]
  18. GitHub: https://github.com/bhdresh/SnortRules
    [CVE-2021-21972]
  19. GitHub: https://github.com/d3sh1n/cve-2021-21972
    [CVE-2021-21972]
  20. GitHub: https://github.com/githubfoam/ubuntu_sandbox
    [CVE-2021-21972]
  21. GitHub: https://github.com/gobysec/Goby
    [CVE-2021-21972]
  22. GitHub: https://github.com/gsheller/vcenter_rce
    [CVE-2021-21972: 漏洞利用,Vmware vCenter 6.5-7.0 RCE(CVE-2021-21972),上传冰蝎3,getshell]
  23. GitHub: https://github.com/haiclover/CVE-2021-21972
    [CVE-2021-21972]
  24. GitHub: https://github.com/halencarjunior/vcenter-rce-2021-21972
    [CVE-2021-21972]
  25. GitHub: https://github.com/itscio/LadonGo
    [CVE-2021-21972]
  26. GitHub: https://github.com/joanbono/nuclei-templates
    [CVE-2021-21972]
  27. GitHub: https://github.com/jweny/pocassistdb
    [CVE-2021-21972]
  28. GitHub: https://github.com/k8gege/LadonGo
    [CVE-2021-21972]
  29. GitHub: https://github.com/lovechinacoco/https-github.com-mai-lang-chai-Middleware-Vulnerability-detection
    [CVE-2021-21972]
  30. GitHub: https://github.com/mdisec/mdisec-twitch-yayinlari
    [CVE-2021-21972]
  31. GitHub: https://github.com/mstxq17/SecurityArticleLogger
    [CVE-2021-21972]
  32. GitHub: https://github.com/n1sh1th/CVE-POC
    [CVE-2021-21972]
  33. GitHub: https://github.com/orangmuda/CVE-2021-21972
    [CVE-2021-21972: CVE-2021-21972 – ᴠᴍᴡᴀʀᴇ ᴄʟɪᴇɴᴛ ᴜɴᴀᴜᴛʜᴏʀɪᴢᴇᴅ ᴄᴏᴅᴇ ɪɴᴊᴇᴄᴛɪᴏɴ (ʀᴄᴇ)]
  34. GitHub: https://github.com/oxctdev/CVE-2021-21972
    [CVE-2021-21972: CVE-2021-21972 – ᴠᴍᴡᴀʀᴇ ᴄʟɪᴇɴᴛ ᴜɴᴀᴜᴛʜᴏʀɪᴢᴇᴅ ᴄᴏᴅᴇ ɪɴᴊᴇᴄᴛɪᴏɴ (ʀᴄᴇ)]
  35. GitHub: https://github.com/password520/CVE-2021-21972
    [CVE-2021-21972]
  36. GitHub: https://github.com/password520/LadonGo
    [CVE-2021-21972]
  37. GitHub: https://github.com/r0eXpeR/supplier
    [CVE-2021-21972]
  38. GitHub: https://github.com/saucer-man/exploit
    [CVE-2021-21972]
  39. GitHub: https://github.com/stevenp322/cve-2021-21972
    [CVE-2021-21972]
  40. GitHub: https://github.com/tijldeneut/Security
    [CVE-2021-21972]
  41. GitHub: https://github.com/tom0li/collection-document
    [CVE-2021-21972]
  42. GitHub: https://github.com/viksafe/Get-vSphereVersion
    [CVE-2021-21972]
  43. GitHub: https://github.com/yaunsky/CVE-2021-21972
    [CVE-2021-21972]
  44. GitHub: https://github.com/zhzyker/vulmap
    [CVE-2021-21972]
  45. GitHub: https://github.com/DaveCrown/vmware-kb82374
    [CVE-2021-21973]
  46. GitHub: https://github.com/EdgeSecurityTeam/Vulnerability
    [CVE-2021-21973]
  47. GitHub: https://github.com/SexyBeast233/SecBooks
    [CVE-2021-21973]
  48. GitHub: https://github.com/byteofjoshua/CVE-2021-21972
    [CVE-2021-21973]
  49. GitHub: https://github.com/murataydemir/CVE-2021-21972
    [CVE-2021-21973]
  50. GitHub: https://github.com/psc4re/NSE-scripts
    [CVE-2021-21973]
  51. GitHub: https://github.com/B1anda0/CVE-2021-21972
    [CVE-2021-21972: VMware vCenter Server远程代码执行漏洞 (CVE-2021-21972)批量检测脚本]
  52. GitHub: https://github.com/byteofjoshua/CVE-2021-21972
    [CVE-2021-21972: CVE-2021-21972 – ᴠᴍᴡᴀʀᴇ ᴄʟɪᴇɴᴛ ᴜɴᴀᴜᴛʜᴏʀɪᴢᴇᴅ ᴄᴏᴅᴇ ɪɴᴊᴇᴄᴛɪᴏɴ (ʀᴄᴇ)]
  53. GitHub: https://github.com/ByZain/CVE-2021-21972
    [CVE-2021-21972: CVE-2021-21972 related vulnerability code]
  54. GitHub: https://github.com/conjojo/VMware_vCenter_UNAuthorized_RCE_CVE-2021-21972
    [CVE-2021-21972: VMware vCenter 未授权RCE(CVE-2021-21972)]
  55. GitHub: https://github.com/GuayoyoCyber/CVE-2021-21972
    [CVE-2021-21972: Nmap script to check vulnerability CVE-2021-21972]
  56. GitHub: https://github.com/horizon3ai/CVE-2021-21972
    [CVE-2021-21972: Proof of Concept Exploit for vCenter CVE-2021-21972]
  57. GitHub: https://github.com/Ma1Dong/vcenter_rce
    [CVE-2021-21972: 漏洞利用,Vmware vCenter 6.5-7.0 RCE(CVE-2021-21972),上传冰蝎3,getshell]
  58. GitHub: https://github.com/milo2012/CVE-2021-21972
    [CVE-2021-21972]
  59. GitHub: https://github.com/murataydemir/CVE-2021-21972
    [CVE-2021-21972: [CVE-2021-21972] VMware vSphere Client Unauthorized File Upload to Remote Code ...]
  60. GitHub: https://github.com/NS-Sp4ce/CVE-2021-21972
    [CVE-2021-21972: CVE-2021-21972 Exploit]
  61. GitHub: https://github.com/Osyanina/westone-CVE-2021-21972-scanner
    [CVE-2021-21972: A vulnerability scanner that detects CVE-2021-21972 vulnerabilities.]
  62. GitHub: https://github.com/pettyhacks/vSphereyeeter
    [CVE-2021-21972: POC exploit for CVE-2021-21972]
  63. GitHub: https://github.com/renini/CVE-2021-21972
    [CVE-2021-21972]
  64. GitHub: https://github.com/robwillisinfo/VMware_vCenter_CVE-2021-21972
    [CVE-2021-21972: VMware vCenter CVE-2021-21972 Tools]
  65. GitHub: https://github.com/TaroballzChen/CVE-2021-21972
    [CVE-2021-21972: CVE-2021-21972 Unauthorized RCE in VMware vCenter metasploit exploit script]
  66. GitHub: https://github.com/Udyz/CVE-2021-21972
    [CVE-2021-21972: CVE-2021-21972 vCenter-6.5-7.0 RCE POC]
  67. GitHub: https://github.com/psc4re/NSE-scripts
    [CVE-2021-21972: NSE scripts to detect CVE-2020-1350 SIGRED and CVE-2020-0796 SMBGHOST, ...]
  68. GitHub: https://github.com/freakanonymous/CVE-2021-21973-Automateme
    [CVE-2021-21973: Automate me!]

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-21972
CVSS V2 Vector: AV:N/AC:L/Au:N/C:C/I:C/A:C/E:H/RL:OF/RC:C
CVSS Base Score:10.0 (High)
Impact Subscore:10.0
Exploitability Subscore:10.0
CVSS Temporal Score:8.7 (High)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:8.7 (High)
CVSS V3 Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:H/RL:O/RC:C
CVSS Base Score:9.8 (Critical)
Impact Subscore:5.9
Exploitability Subscore:3.9
CVSS Temporal Score:9.4 (Critical)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:9.4 (Critical)
STIG Severity [?]: I
STIG Risk Rating: High

Go back to menu.

Plugin Source


This is the vmware_vcenter_vmsa-2021-0002.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(146826);
  script_version("1.10");
  script_set_attribute(attribute:"plugin_modification_date", value:"2022/03/08");

  script_cve_id("CVE-2021-21972", "CVE-2021-21973");
  script_xref(name:"IAVA", value:"2021-A-0109");
  script_xref(name:"CISA-KNOWN-EXPLOITED", value:"2021/11/17");
  script_xref(name:"CISA-KNOWN-EXPLOITED", value:"2022/03/21");

  script_name(english:"VMware vCenter Server 6.5 / 6.7 / 7.0 Multiple Vulnerabilities (VMSA-2021-0002)");

  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 6.5 prior to 6.5 U3n, 6.7 prior to 6.7 U3l or 7.0
prior to 7.0 U1c. It is, therefore, affected by multiple vulnerabilities, as follows:

  - The vSphere Client (HTML5) contains a remote code execution vulnerability in a vCenter Server plugin. A malicious
    actor with network access to port 443 may exploit this issue to execute commands with unrestricted privileges on the
    underlying operating system that hosts vCenter Server. This affects VMware vCenter Server (7.x before 7.0 U1c, 6.7
    before 6.7 U3l and 6.5 before 6.5 U3n) and VMware Cloud Foundation (4.x before 4.2 and 3.x before 3.10.1.2).
    (CVE-2021-21972)

  - The vSphere Client (HTML5) contains an SSRF (Server Side Request Forgery) vulnerability due to improper validation
    of URLs in a vCenter Server plugin. A malicious actor with network access to port 443 may exploit this issue by
    sending a POST request to vCenter Server plugin leading to information disclosure. This affects: VMware vCenter
    Server (7.x before 7.0 U1c, 6.7 before 6.7 U3l and 6.5 before 6.5 U3n) and VMware Cloud Foundation (4.x before 4.2
    and 3.x before 3.10.1.2). (CVE-2021-21973)

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-0002.html");
  script_set_attribute(attribute:"solution", value:
"Upgrade to VMware vCenter Server 6.5 U3n, 6.7 U3l, 7.0 U1c or later or apply the workaround mentioned in the advisory.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/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:N/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-21972");

  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 Unauthenticated OVA File Upload RCE');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");

  script_set_attribute(attribute:"vuln_publication_date", value:"2021/02/23");
  script_set_attribute(attribute:"patch_publication_date", value:"2021/02/23");
  script_set_attribute(attribute:"plugin_publication_date", value:"2021/02/25");

  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);
}

fixes = make_array(
  '6.5', '17590285', # 6.5 U3n
  '6.7', '17137232', # Lower version for 6.7 U3l from https://kb.vmware.com/s/article/2143838
  '7.0', '17327517'  # 7.0 U1c
);

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

# Extract and verify the build number
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 6.5 / 6.7 / 7.0');

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

ver = match[1];
if (ver !~ "^(7\.0|6\.(5|7))$") audit(AUDIT_OS_NOT, 'VMware vCenter 6.5 / 6.7 / 7.0');

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);

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_vmsa-2021-0002.nasl
  • Windows:
    C:\ProgramData\Tenable\Nessus\nessus\plugins\vmware_vcenter_vmsa-2021-0002.nasl
  • Mac OS X:
    /Library/Nessus/run/lib/nessus/plugins/vmware_vcenter_vmsa-2021-0002.nasl

Go back to menu.

How to Run


Here is how to run the VMware vCenter Server 6.5 / 6.7 / 7.0 Multiple Vulnerabilities (VMSA-2021-0002) 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 6.5 / 6.7 / 7.0 Multiple Vulnerabilities (VMSA-2021-0002) plugin ID 146826.
  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_vmsa-2021-0002.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a vmware_vcenter_vmsa-2021-0002.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_vmsa-2021-0002.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_vmsa-2021-0002.nasl -t <IP/HOST>

Go back to menu.

References


IAVA | Information Assurance Vulnerability Alert:
  • 2021-A-0109
See also: Similar and related Nessus plugins:
  • 146825 - VMware vCenter Server RCE (direct check)
  • 146827 - ESXi 6.5 / 6.7 / 7.0 RCE (VMSA-2021-0002)

Version


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

Go back to menu.