HexBrain

Browse / CVEs / CVE-2021-21985

CVE-2021-21985· vmware / vcenter server· CWE-20

VMware vSphere Client (HTML5) - Remote Code Execution

Exploited in the wild. Listed by CISA on 2021-11-03; known to be used by ransomware.

criticalseverity
9.8CVSS score
100%likelihood of exploitation, next 30 days
100%of all CVEs are less likely
Readycheck to confirm it

The vSphere Client (HTML5) contains a remote code execution vulnerability due to lack of input validation in the Virtual SAN Health Check plug-in which is enabled by default in vCenter Server. 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.

Impact

Successful exploitation of this vulnerability could allow an attacker to execute arbitrary code on the affected system.

Fix

Apply the necessary security patches or updates provided by VMware to mitigate this vulnerability.

How to confirm it

Send: POST /ui/h5-vsan/rest/proxy/service/com.vmware.vsan.client.services.capability.VsanCapabilityProvider/getClusterCapabilityData
Positive when: contains "{\"result\":{\"isDisconnected\":"

Run it with nuclei: nuclei -id CVE-2021-21985 -u <target>. This check is not marked as verified by its authors.

The full check
id: CVE-2021-21985

info:
  name: VMware vSphere Client (HTML5) - Remote Code Execution
  author: D0rkerDevil
  severity: critical
  description: |
    The vSphere Client (HTML5) contains a remote code execution vulnerability due to lack of input validation in the Virtual SAN Health Check plug-in which is enabled by default in vCenter Server. 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.
  impact: |
    Successful exploitation of this vulnerability could allow an attacker to execute arbitrary code on the affected system.
  remediation: |
    Apply the necessary security patches or updates provided by VMware to mitigate this vulnerability.
  reference:
    - https://www.vmware.com/security/advisories/VMSA-2021-0010.html
    - https://github.com/alt3kx/CVE-2021-21985_PoC
    - https://nvd.nist.gov/vuln/detail/CVE-2021-21985
    - http://packetstormsecurity.com/files/162812/VMware-Security-Advisory-2021-0010.html
    - https://github.com/onSec-fr/CVE-2021-21985-Checker
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
    cvss-score: 9.8
    cve-id: CVE-2021-21985
    cwe-id: CWE-20
    epss-score: 0.99999
    epss-percentile: 0.99992
    cpe: cpe:2.3:a:vmware:vcenter_server:6.5:-:*:*:*:*:*:*
  metadata:
    max-request: 1
    vendor: vmware
    product: vcenter_server
  tags: cve2021,cve,packetstorm,rce,vsphere,vmware,kev,vkev,vuln

http:
  - raw:
      - |
        POST /ui/h5-vsan/rest/proxy/service/com.vmware.vsan.client.services.capability.VsanCapabilityProvider/getClusterCapabilityData HTTP/1.1
        Host: {{Hostname}}
        Accept: */*
        Content-Type: application/json

        {"methodInput":[{"type":"ClusterComputeResource","value": null,"serverGuid": null}]}

    matchers:
      - type: word
        part: body
        words:
          - '{"result":{"isDisconnected":'

References

Use this check only on systems you are authorised to test. Where the data comes from