Skip to main content
Mallory
CriticalExploited in the wildCISA KEVPublic exploitVulnerability

CVE-2021-21985: Remote Code Execution in VMware vCenter Server vSAN Health Check Plug-in

Published May 26, 2021 · Updated today
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 days3 mentions · peak 3 in a dayToday
CVSS9.8Critical · v3.1
EPSS100.0%100th percentile
CISA KEVYesAdded Nov 3, 2021
In the wildActivePer CISA KEV
Vendor
VMware
IdentifiersCVE-2021-21985CWE-20 · Improper Input Validation

CVE-2021-21985 is a critical remote code execution vulnerability in the VMware vSphere Client (HTML5), caused by missing input validation in the Virtual SAN Health Check plug-in, which is enabled by default. It affects vulnerable VMware vCenter Server 6.5, 6.7, and 7.0 releases, including deployments within VMware Cloud Foundation. An unauthenticated attacker with network access to TCP port 443 can submit crafted requests to execute arbitrary commands on the operating system hosting vCenter Server. The vulnerability has a CVSS v3 base score of 9.8 and has been actively exploited.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

Impact, mitigation & remediation

What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation compromises the vCenter host through arbitrary operating-system command execution, threatening the confidentiality, integrity, and availability of the virtualization management environment. Observed exploitation includes web-shell deployment, and the vulnerability has been used in ransomware-related activity and cryptocurrency-mining campaigns. Although vendor advisories describe unrestricted command execution, documented vCenter appliance exploitation can initially execute as the vsphere-ui service account rather than root; root access may require a separate privilege-escalation vulnerability.

Mitigation

If you can’t patch tonight, do this now.

If immediate patching is not possible, apply the VMware KB 83829 workaround to disable the affected plug-in functionality. Remove public exposure of vCenter management interfaces and restrict TCP port 443 access to trusted administrative systems through firewall rules and management-network segmentation. These measures reduce exposure but do not replace the security update.

Remediation

Patch, then assume compromise.

Apply the VMware updates addressing VMSA-2021-0010. Fixed releases include vCenter Server 7.0 U2b, 6.7 U3n, and 6.5 U3p, and VMware Cloud Foundation 4.2.1 and 3.10.2.1. Prefer a currently supported release incorporating these fixes. Prioritize exposed management servers and investigate potentially compromised systems, because patching does not remove existing attacker access or persistence.

Public exploits

Exploits

6 exploits validated by Mallory's analysis. Hidden: 1 rejected by Mallory's analysis as not a working exploit.

View more in app →
vmware_vcenter_vsan_health_rce.rbThis repository contains a single Metasploit module targeting CVE-2021-21985, a critical remote code execution vulnerability in VMware vCenter Server's Virtual SAN Health Check plugin. The exploit leverages unsafe Java reflection and SSRF in the ProxygenController class to execute arbitrary commands as the vsphere-ui user. The module supports both command execution and dropper payloads, allowing for reverse shells or Meterpreter sessions. It interacts with the vCenter server over HTTPS, specifically targeting the /ui/h5-vsan/rest/proxy/service/vmodlContext/loadVmodlPackages endpoint to deliver a malicious ZIP file containing a crafted XML Spring bean definition. The module is weaponized, providing reliable exploitation and payload delivery options. The repository is structured as a single Ruby file compatible with the Metasploit framework, and is intended for use by penetration testers or red teamers to demonstrate or exploit this vulnerability.Disclosed May 25, 2021 · Framework: metasploit · ruby · networkWeaponizedcve-2021-21985_expThis repository contains a working exploit for CVE-2021-21985, a critical remote code execution vulnerability in VMware vCenter Server's vSphere UI. The main exploit script, 'cve-2021-21985.py', is a Python program that automates the exploitation process by sending a series of crafted POST requests to the vulnerable REST API endpoint '/ui/h5-vsan/rest/proxy/service/&vsanQueryUtil_setDataService' on the target vCenter Server. The exploit leverages a JNDI injection vulnerability to trigger a remote lookup via javax.naming.InitialContext.doLookup, causing the target to connect to an attacker-controlled RMI server (e.g., 'rmi://8.8.8.8:1099/Exploit'). This can result in arbitrary code execution, such as spawning a reverse shell. The repository also includes a README with detailed exploitation steps, references, and usage instructions. The only code file is the exploit script; the rest are IDE configuration files. The exploit is operational and requires the attacker to set up an RMI server and a listener for the reverse shell.xnianq · Disclosed Jun 3, 2021 · python · networkOperationalProject_CVE-2021-21985_PoCThis repository contains a working exploit for CVE-2021-21985, a critical remote code execution vulnerability in VMware vCenter Server's vSAN plugin. The repository includes two main Python proof-of-concept scripts (PoC_1.py and PoC_3.py), a C source file (JNI_Rce.c) and its header (JNI_Rce.h) for a JNI shared library payload, and a README with compilation instructions. - PoC_1.py crafts a multi-stage attack: it writes a malicious class file and a command (such as a reverse shell) to the target's /tmp directory via the vSAN plugin's REST API, then loads a JNI shared library to execute the command. The exploit abuses several endpoints under /ui/h5-vsan/rest/proxy/service/&vsanQueryUtil_setDataService/. - PoC_3.py provides an interactive shell-like interface, using a Spring beans XML payload zipped and base64-encoded, which is then loaded via the vSAN plugin to execute arbitrary commands. Output is exfiltrated by reading a system property set by the payload. - JNI_Rce.c is the C code for the JNI shared library, which reads a command from /tmp/.cfg1487.class and executes it via Java's Runtime.exec(). The exploit is operational and provides full remote code execution on unpatched vCenter Servers. The main attack vector is network-based, targeting the vSAN plugin's REST API endpoints. The repository is well-structured, with clear separation between payload, exploit logic, and documentation.testanull · Disclosed Jun 5, 2021 · c · python · networkOperationalVcenterKillerThis repository, 'VcenterKiller', is a comprehensive exploitation toolkit written in Go, targeting multiple critical vulnerabilities in VMware vCenter Server and Workspace ONE Access. It supports exploitation of CVE-2021-21972, CVE-2021-21985, CVE-2021-22005, CVE-2021-44228 (Log4Shell), CVE-2022-22954, CVE-2022-22972, and CVE-2022-31656. The tool provides modules for remote code execution, webshell upload, SSH key injection, authentication bypass, and Log4j JNDI injection (with built-in LDAP/RMI servers for payload delivery). The main entry point is 'main.go', which dispatches to specific modules under 'src/'. Each module implements the exploit logic for a specific CVE, with endpoints and payloads tailored to the vulnerability. The tool is operational and can be used for post-exploitation, red teaming, or authorized penetration testing of VMware environments. The codebase is modular, with clear separation of exploit logic per CVE, and includes support for proxies and various attack modes. The README provides detailed usage instructions and legal disclaimers.Schira4396 · Disclosed Oct 4, 2022 · go · networkOperationalCVE-2021-21985_PoCThis repository provides a Proof-of-Concept (PoC) exploit and detection script for CVE-2021-21985, a critical remote code execution vulnerability in VMware vCenter Server (versions 6.5 to 7.0). The main code file, 'CVE-2021-21985.nse', is an Nmap Scripting Engine (NSE) script that checks if a target vCenter instance is vulnerable by sending a crafted POST request to the vSAN Health Check REST API endpoint and analyzing the response. The README.md details both the vulnerability and a manual exploitation chain, showing how an attacker can leverage a series of POST requests to specific REST endpoints to achieve remote code execution via JNDI (RMI) payloads. The repository also documents relevant log file paths for monitoring exploitation attempts. The exploit is network-based, targeting the HTTPS interface of vCenter, and does not require authentication if the vulnerable plug-in is enabled. The code is a PoC and does not include a weaponized payload, but the manual steps demonstrate how to achieve code execution. The repository is structured with a single code file (Lua/NSE), a README with detailed exploitation steps, and a license file.alt3kx · Disclosed May 29, 2021 · lua · networkPoCCVE-2021-21985_PoCThis repository provides a proof-of-concept (PoC) exploit for CVE-2021-21985, a remote code execution vulnerability in VMware vCenter Server's VSAN Health Check plugin. The repository contains two files: a README.md with usage instructions and vulnerability details, and a Bash script ('cve-2021-21985_PoC') that implements the exploit logic. The script sends a crafted POST request to the vulnerable vCenter endpoint over HTTPS, targeting the '/ui/h5-vsan/rest/proxy/service/com.vmware.vsan.client.services.capability.VsanCapabilityProvider/<Class/Method>' path. The script can list available methods or attempt to exploit a specific method. The exploit requires network access to the target's port 443 and is effective against unpatched vCenter Server and Cloud Foundation versions as specified. The code is a straightforward PoC and does not include advanced payload customization or post-exploitation features.sknux · Disclosed Nov 9, 2021 · bash · networkPoC
Exposure surface

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
VMwareVmware Cloud Foundationapplication
VMwareVmware Vcenter Serverapplication
FAQ

Frequently asked questions

Is CVE-2021-21985 exploited in the wild?
Yes. As of Nov 27, 2026, Mallory has reports of exploitation in the wild, and CISA added it to KEV on Nov 3, 2021.
Is there a public exploit for CVE-2021-21985?
Yes. Mallory tracks 6 public exploits or proofs of concept for CVE-2021-21985, the earliest disclosed May 25, 2021.
Is there a patch for CVE-2021-21985?
Apply the VMware updates addressing VMSA-2021-0010. Fixed releases include vCenter Server 7.0 U2b, 6.7 U3n, and 6.5 U3p, and VMware Cloud Foundation 4.2.1 and 3.10.2.1.
What products are affected by CVE-2021-21985?
Vmware Cloud Foundation and Vmware Vcenter Server.
How severe is CVE-2021-21985?
CVE-2021-21985 has a CVSS v3.1 score of 9.8 (Critical) and an EPSS score of 100.0% (100th percentile) as of Nov 27, 2026.
Activity feed

Recent activity

19 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.

View more in app →
+9 more in the timeline. Sign up to see them
Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidence1Every report linking this CVE to a named adversary.
Associated malware3Malware families linked to this CVE, with evidence and IOCs.
Detection signatures4YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activity1Community discussion across Reddit, Mastodon, and other social sources.